test/tint: Fix e2e test generation for vec / mat Where the intrinsic uses the fixed-dimension form of the types. Change-Id: I1709382f762fe7394bbd88f428f09b15a1a8a643 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108642 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/gen.wgsl.tmpl b/test/tint/builtins/gen/gen.wgsl.tmpl index f0cbd4a..0dfe879 100644 --- a/test/tint/builtins/gen/gen.wgsl.tmpl +++ b/test/tint/builtins/gen/gen.wgsl.tmpl
@@ -270,17 +270,17 @@ {{- $float_value := $value }} {{- if not (Contains $value ".") }}{{$float_value = printf "%v." $value}}{{end}} {{- /* emit the value with any necessary suffixes */ -}} -{{- if eq $ty.Target.Name "i32" -}}{{$value}}i -{{- else if eq $ty.Target.Name "u32" -}}{{$value}}u -{{- else if eq $ty.Target.Name "f32" -}}{{$float_value}}f -{{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} -{{- else if eq $ty.Target.Name "ia" -}}{{$value}} -{{- else if eq $ty.Target.Name "bool" -}}true -{{- else if eq $ty.Target.Name "vec" -}} -{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} +{{- if eq $ty.Target.Name "i32" -}}{{$value}}i +{{- else if eq $ty.Target.Name "u32" -}}{{$value}}u +{{- else if eq $ty.Target.Name "f32" -}}{{$float_value}}f +{{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} +{{- else if eq $ty.Target.Name "ia" -}}{{$value}} +{{- else if eq $ty.Target.Name "bool" -}}true +{{- else if HasPrefix $ty.Target.Name "vec" -}} +{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }} {{- template "Type" $ty}}({{$el}}) -{{- else if eq $ty.Target.Name "mat" -}}{{template "Type" $ty}}( -{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} +{{- else if HasPrefix $ty.Target.Name "mat" -}}{{template "Type" $ty}}( +{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }} {{- range $col := Iterate (index $ty.TemplateArguments 0) }} {{- range $row := Iterate (index $ty.TemplateArguments 1) }} {{- if or $col $row -}}, {{end}}{{$el}} @@ -297,18 +297,27 @@ {{- /* ------------------------------------------------------------------ */ -}} {{- if IsType .Target -}} {{- if DeepestElementType . | 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" (ElementType .)}}> -{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}> -{{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} -{{- end -}} -{{- else if IsEnumEntry .Target -}}{{.Target.Name}} -{{- else if IsEnumMatcher .Target -}}{{(index .Target.Options 0).Name}} -{{- else -}}<unhandled-fully-qualified-name-target={{- printf "%T" .Target -}}> -{{- end -}} +{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}} +{{- else if eq .Target.Name "vec2" -}}vec2 +{{- else if eq .Target.Name "vec3" -}}vec3 +{{- else if eq .Target.Name "vec4" -}}vec4 +{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}} +{{- else if HasPrefix .Target.Name "mat" -}}mat{{.Target.Name}} +{{- else -}} +{{- end -}} +{{- /* note: intrinsics.def has different type definitions for 'vec<N: num, T>', + 'vec2<T>', 'vec3<T>'. Because of this we need to check whether the type + name is exactly 'vec' and 'mat' and if not, then look for the prefix. */ -}} +{{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" (ElementType .)}}> +{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}> +{{- else if HasPrefix .Target.Name "vec" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}> +{{- else if HasPrefix .Target.Name "mat" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}> +{{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} +{{- end -}} +{{- else if IsEnumEntry .Target -}}{{.Target.Name}} +{{- else if IsEnumMatcher .Target -}}{{(index .Target.Options 0).Name}} +{{- else -}}<unhandled-fully-qualified-name-target={{- printf "%T" .Target -}}> +{{- end -}} {{- end -}}
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl index d99f749..7e13aab 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl
@@ -23,7 +23,7 @@ // fn cross(vec3<f32>, vec3<f32>) -> vec3<f32> fn cross_041cb0() { - var res: vec3<f32> = cross(vec3<f32>(), vec3<f32>()); + var res: vec3<f32> = cross(vec3<f32>(1.f), vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl index 36e4194..b055c81 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl
@@ -1,5 +1,5 @@ void cross_041cb0() { - float3 res = cross((0.0f).xxx, (0.0f).xxx); + float3 res = cross((1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl index 36e4194..b055c81 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl
@@ -1,5 +1,5 @@ void cross_041cb0() { - float3 res = cross((0.0f).xxx, (0.0f).xxx); + float3 res = cross((1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl index b0e727f..e7b0ce3 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl index 01500bb..be5675f 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void cross_041cb0() { - float3 res = cross(float3(0.0f), float3(0.0f)); + float3 res = cross(float3(1.0f), float3(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm index bad958c..07b9592 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cross/041cb0.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 %cross_041cb0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Cross %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Cross %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cross_041cb0 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cross_041cb0 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 %cross_041cb0 + %29 = OpLabel + %30 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cross_041cb0 + %32 = OpLabel + %33 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl index b4f3b74..6928bca 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn cross_041cb0() { - var res : vec3<f32> = cross(vec3<f32>(), vec3<f32>()); + var res : vec3<f32> = cross(vec3<f32>(1.0f), vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl index ba13074..aaae266 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl
@@ -25,7 +25,7 @@ // fn cross(vec3<f16>, vec3<f16>) -> vec3<f16> fn cross_9857cb() { - var res: vec3<f16> = cross(vec3<f16>(), vec3<f16>()); + var res: vec3<f16> = cross(vec3<f16>(f16()), vec3<f16>(f16())); } @vertex
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl index 2d151e8..f991031 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ enable f16; fn cross_9857cb() { - var res : vec3<f16> = cross(vec3<f16>(), vec3<f16>()); + var res : vec3<f16> = cross(vec3<f16>(f16()), vec3<f16>(f16())); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl index 2b0e8d9..6786f51 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl
@@ -23,7 +23,7 @@ // fn pack2x16float(vec2<f32>) -> u32 fn pack2x16float_0e97b3() { - var res: u32 = pack2x16float(vec2<f32>()); + var res: u32 = pack2x16float(vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl index f142fb8..c3960d7 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16float_0e97b3() { - uint res = tint_pack2x16float((0.0f).xx); + uint res = tint_pack2x16float((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl index f142fb8..c3960d7 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16float_0e97b3() { - uint res = tint_pack2x16float((0.0f).xx); + uint res = tint_pack2x16float((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl index bedec15..56f778f 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl index d3c14f8..5c528a2 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void pack2x16float_0e97b3() { - uint res = as_type<uint>(half2(float2(0.0f))); + uint res = as_type<uint>(half2(float2(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm index 257789a..8a0cd46 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm
@@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16float_0e97b3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackHalf2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackHalf2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16float_0e97b3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16float_0e97b3 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/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl index fca0987..966d268 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn pack2x16float_0e97b3() { - var res : u32 = pack2x16float(vec2<f32>()); + var res : u32 = pack2x16float(vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl index ba71668..2fd8fa0 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl
@@ -23,7 +23,7 @@ // fn pack2x16snorm(vec2<f32>) -> u32 fn pack2x16snorm_6c169b() { - var res: u32 = pack2x16snorm(vec2<f32>()); + var res: u32 = pack2x16snorm(vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl index cb5ec97..97b0f20 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm((0.0f).xx); + uint res = tint_pack2x16snorm((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl index cb5ec97..97b0f20 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm((0.0f).xx); + uint res = tint_pack2x16snorm((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl index 489de97..b7a10f9 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl index 7c11475..87aa18e 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void pack2x16snorm_6c169b() { - uint res = pack_float_to_snorm2x16(float2(0.0f)); + uint res = pack_float_to_snorm2x16(float2(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm index c7b4a14..05e4bea 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm
@@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16snorm_6c169b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackSnorm2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackSnorm2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16snorm_6c169b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16snorm_6c169b 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/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl index 0d9fafc..6878ce5 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn pack2x16snorm_6c169b() { - var res : u32 = pack2x16snorm(vec2<f32>()); + var res : u32 = pack2x16snorm(vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl index 6a1bb6a..4850d21 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl
@@ -23,7 +23,7 @@ // fn pack2x16unorm(vec2<f32>) -> u32 fn pack2x16unorm_0f08e4() { - var res: u32 = pack2x16unorm(vec2<f32>()); + var res: u32 = pack2x16unorm(vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl index 69b0a5f..400d4ed 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm((0.0f).xx); + uint res = tint_pack2x16unorm((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl index 69b0a5f..400d4ed 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@ } void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm((0.0f).xx); + uint res = tint_pack2x16unorm((1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl index ee5df00..c1d22aa 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl index 5661b98..1d2e143 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void pack2x16unorm_0f08e4() { - uint res = pack_float_to_unorm2x16(float2(0.0f)); + uint res = pack_float_to_unorm2x16(float2(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm index ca7368c..cd23181 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm
@@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16unorm_0f08e4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackUnorm2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackUnorm2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16unorm_0f08e4 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16unorm_0f08e4 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/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl index 0ddd089..dbec285 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn pack2x16unorm_0f08e4() { - var res : u32 = pack2x16unorm(vec2<f32>()); + var res : u32 = pack2x16unorm(vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl index 11e2e1f..085bb2d 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl
@@ -23,7 +23,7 @@ // fn pack4x8snorm(vec4<f32>) -> u32 fn pack4x8snorm_4d22e7() { - var res: u32 = pack4x8snorm(vec4<f32>()); + var res: u32 = pack4x8snorm(vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl index 073431c..c1480e7 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@ } void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm((0.0f).xxxx); + uint res = tint_pack4x8snorm((1.0f).xxxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl index 073431c..c1480e7 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@ } void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm((0.0f).xxxx); + uint res = tint_pack4x8snorm((1.0f).xxxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl index a61b9cb..30deb26 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl index 5af9d4b..fb2a04b 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void pack4x8snorm_4d22e7() { - uint res = pack_float_to_snorm4x8(float4(0.0f)); + uint res = pack_float_to_snorm4x8(float4(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm index 34bcbe2..cae0cc4 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.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 %uint = OpTypeInt 32 0 -%_ptr_Function_uint = OpTypePointer Function %uint - %18 = OpConstantNull %uint - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %20 = OpConstantNull %uint + %21 = OpTypeFunction %v4float %pack4x8snorm_4d22e7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %18 - %13 = OpExtInst %uint %15 PackSnorm4x8 %5 + %res = OpVariable %_ptr_Function_uint Function %20 + %13 = OpExtInst %uint %15 PackSnorm4x8 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pack4x8snorm_4d22e7 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pack4x8snorm_4d22e7 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 %pack4x8snorm_4d22e7 + %29 = OpLabel + %30 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8snorm_4d22e7 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl index bb4d5a2..1ff4946 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn pack4x8snorm_4d22e7() { - var res : u32 = pack4x8snorm(vec4<f32>()); + var res : u32 = pack4x8snorm(vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl index ed9074a..d130a03 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl
@@ -23,7 +23,7 @@ // fn pack4x8unorm(vec4<f32>) -> u32 fn pack4x8unorm_95c456() { - var res: u32 = pack4x8unorm(vec4<f32>()); + var res: u32 = pack4x8unorm(vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl index a4e6e76..34537aa 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@ } void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm((0.0f).xxxx); + uint res = tint_pack4x8unorm((1.0f).xxxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl index a4e6e76..34537aa 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@ } void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm((0.0f).xxxx); + uint res = tint_pack4x8unorm((1.0f).xxxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl index 29d5585..826c904 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl
@@ -1,7 +1,7 @@ #version 310 es void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ precision mediump float; void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ #version 310 es void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl index be93a80..96f61ca 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void pack4x8unorm_95c456() { - uint res = pack_float_to_unorm4x8(float4(0.0f)); + uint res = pack_float_to_unorm4x8(float4(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm index 69e8a3f..410e72e 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.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 %uint = OpTypeInt 32 0 -%_ptr_Function_uint = OpTypePointer Function %uint - %18 = OpConstantNull %uint - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %20 = OpConstantNull %uint + %21 = OpTypeFunction %v4float %pack4x8unorm_95c456 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %18 - %13 = OpExtInst %uint %15 PackUnorm4x8 %5 + %res = OpVariable %_ptr_Function_uint Function %20 + %13 = OpExtInst %uint %15 PackUnorm4x8 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pack4x8unorm_95c456 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pack4x8unorm_95c456 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 %pack4x8unorm_95c456 + %29 = OpLabel + %30 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8unorm_95c456 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl index 1aca6f3..9b6adee 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ fn pack4x8unorm_95c456() { - var res : u32 = pack4x8unorm(vec4<f32>()); + var res : u32 = pack4x8unorm(vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl index 43f2d69..3641e75 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32> fn textureGather_0166ec() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl index d830838..6d68bcb 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl index d830838..6d68bcb 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl index 4c7cbf8..51c3ece 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl index 71d1318..1c68ab7 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm index 0604de6..783c096 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm
@@ -46,32 +46,32 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %textureGather_0166ec = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 + %20 = OpImageGather %v4int %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_0166ec +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_0166ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl index 0ed3403..8e2b64c 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_0166ec() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl index fa8bb16..ed3f46c 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32> fn textureGather_04fa78() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl index ab6b555..74e06a3 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl index ab6b555..74e06a3 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl index 567f692..e2de24c 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm index ea71a5e..e22ebf7 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,44 +46,48 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4int + %39 = OpTypeFunction %v4float %textureGather_04fa78 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %30 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_04fa78 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_04fa78 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_04fa78 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_04fa78 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl index 4d93ff5..0e53955 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_04fa78() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl index ab254c7..d913365 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> fn textureGather_10c554() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>()); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl index 2507fce..961fbcd 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float4 res = arg_0.Gather(arg_1, (0.0f).xxx); + float4 res = arg_0.Gather(arg_1, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl index 2507fce..961fbcd 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float4 res = arg_0.Gather(arg_1, (0.0f).xxx); + float4 res = arg_0.Gather(arg_1, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl index 47d056b..8efbbef 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl index c3f13c1..1c70a63 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_10c554(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm index 44cf7b1..1054b44 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_10c554 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 + %19 = OpImageGather %v4float %23 %26 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_10c554 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_10c554 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl index a4a17cb..b4c068d 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_10c554() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>()); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl index 91d42e6..27c181d 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> fn textureGather_11b2db() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl index 2a83a5c..7f5a764 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl index 2a83a5c..7f5a764 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl index 9e24c71..a3ee0b8 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl index 759ae4a..900c473 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm index 2a4f5dd..d86eceb 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_11b2db = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 + %19 = OpImageGather %v4float %23 %26 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_11b2db +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_11b2db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl index f4c60b3..4598046 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_11b2db() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl index 0f6d84c..b98fda0 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32> fn textureGather_17baac() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl index d61645c..686fcae 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl index d61645c..686fcae 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl index e180946..1546cc1 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl index 5741331..bf7e8af 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm index 7734fec..b909cdb 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_17baac = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_17baac +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_17baac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_17baac + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_17baac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_17baac + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_17baac OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl index 9735392..a50cddd 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_17baac() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl index f4d677f..6c58f77 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32> fn textureGather_1bf0ab() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl index 07ebb25..e5ae6c4 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl index 07ebb25..e5ae6c4 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl index fa40fb1..bd3941d 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl index 8d68cea..b498c16 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm index c3a739e..bf4b03f 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,43 +46,46 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_1bf0ab = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %33 + %res = OpVariable %_ptr_Function_v4uint Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_1bf0ab +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_1bf0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_1bf0ab + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_1bf0ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_1bf0ab + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_1bf0ab OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl index a909ade..1f2011a 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_1bf0ab() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl index c577b44..1a5f70d 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_1f7f6b() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl index 287fd65..6ca6ff8 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl index 287fd65..6ca6ff8 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl index e76e728..3ca8a15 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl index a861581..0ad58f0 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_1f7f6b(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm index e4a034c..874d548 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,44 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %34 = OpTypeFunction %v4float %textureGather_1f7f6b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 ConstOffset %29 + %19 = OpImageGather %v4float %23 %26 %int_0 ConstOffset %31 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_1f7f6b +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_1f7f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_1f7f6b + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_1f7f6b + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl index 0c466e9..3a3e2cf 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_1f7f6b() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl index ba2383e..0e2c97a 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> fn textureGather_22e930() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl index ad22881..dadcc9e 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl index ad22881..dadcc9e 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl index 79022b7..56ebbfc 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl index b432609..11278d6 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_22e930(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm index 327eac5..4e541a1 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_22e930 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_22e930 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_22e930 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_22e930 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_22e930 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_22e930 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_22e930 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl index 41ad3bb..6e8f47d 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_22e930() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl index 8af9040..bdfac2c 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_238ec4() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl index 5a96bad..e3fe82c 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl index 5a96bad..e3fe82c 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl index 43df0a4..b45b48a 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl index 32e3b88..b1026d2 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm index a637fed..f2bc0de 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_238ec4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_238ec4 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_238ec4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_238ec4 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_238ec4 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl index 37d0344..e985158 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_238ec4() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl index 7d9468c..f922b9c 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> fn textureGather_24b0bd() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl index 68596e19..c543616 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl index 68596e19..c543616 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl index ee71f66..3c0d2c4 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl index 0cc11c3..17bd3dd 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_24b0bd(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm index a3a420b..2e9a562 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_24b0bd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_24b0bd +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_24b0bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_24b0bd + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_24b0bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_24b0bd + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_24b0bd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl index 46c8b4d..2c74356 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_24b0bd() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl index 38fb051..430edb8 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32> fn textureGather_269250() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl index 844cf71..65a7bcc 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl index 844cf71..65a7bcc 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl index 73f7dc6..b22da1b 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl index d7c68bc..61afc23 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_269250(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm index f88bf30..38906b3 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,47 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4int + %39 = OpTypeFunction %v4float %textureGather_269250 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_269250 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_269250 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_269250 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_269250 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_269250 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_269250 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl index 7c75feb..c1431e4 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_269250() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl index 99474a2..f678a5b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32> fn textureGather_2a4f40() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl index 334a85f..9db6f8f 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl index 334a85f..9db6f8f 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl index 5e67696..84872c9 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl index ac60335..a647316 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_2a4f40(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm index a6f0405..ffc18d5 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_2a4f40 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_2a4f40 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_2a4f40 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_2a4f40 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_2a4f40 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_2a4f40 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_2a4f40 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl index 89388ed..bc6a8c0 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2a4f40() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl index fba78db..afa270a 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32> fn textureGather_2cc066() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl index 222acf5..01eef68 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl index 222acf5..01eef68 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl index 7c6c133..906dd13 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl index fa0531a..9c27e69 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_2cc066(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm index a931db1..b8f5938 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,47 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4uint + %39 = OpTypeFunction %v4float %textureGather_2cc066 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_2cc066 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_2cc066 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_2cc066 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_2cc066 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_2cc066 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_2cc066 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl index 318f910..9f71bf4 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_2cc066() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl index d73af28..410adfd 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureGather_2e0ed5() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl index e1a5741..1da303c 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl index e1a5741..1da303c 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl index 8eca46c..c4b7932 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl index 9ae7410..646efa0 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_2e0ed5(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm index 0170582..f787563 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_2e0ed5 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 + %19 = OpImageGather %v4float %23 %26 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_2e0ed5 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_2e0ed5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl index 4b2a82c..94df481 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2e0ed5() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>()); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl index 8bbf3b2..de80564 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> fn textureGather_32c4e8() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl index ce7b157..ce85f35 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl index ce7b157..ce85f35 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl index 3b5504b..bf84c6c 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl index 4553861..7a9044f 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_32c4e8(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm index f2cc297..080c3f8 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_32c4e8 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 + %19 = OpImageGather %v4float %23 %26 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_32c4e8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_32c4e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl index d67ff72..f32d23b 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_32c4e8() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl index 2abaafe..a03abf8 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32> fn textureGather_3b32cc() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl index 4fe9dd1..b018cb7 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl index 4fe9dd1..b018cb7 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl index 38d1176..4860102 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl index 864d36c..5f4d892 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_3b32cc(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm index 829beb2..7144ab2 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm
@@ -46,32 +46,32 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %textureGather_3b32cc = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 + %20 = OpImageGather %v4uint %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_3b32cc +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_3b32cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl index 0358d14..bcee7c0 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_3b32cc() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl index e8221d5..23b0ac9 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> fn textureGather_43025d() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1i); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl index 703fd77..e38f9d9 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl index 703fd77..e38f9d9 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl index 0867050..0ecacb7 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_43025d(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm index a8ef14e..d72e46f 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,44 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureGather_43025d = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_43025d +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_43025d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_43025d + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_43025d + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl index 27be3fd..d249e2d 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_43025d() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1i); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl index 2ad1513..e8637bf 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32> fn textureGather_445793() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl index 286350f..d88812f 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl index 286350f..d88812f 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl index a39af11..5e342a1 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl index a194b15..234f3f1 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_445793(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm index 4af17b3..5166bb9 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_445793 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_445793 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_445793 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_445793 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_445793 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_445793 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_445793 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl index 93e20ca..c677b36 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_445793() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl index 633899dc..56731ba 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_49b07f() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl index b70c482..e0d34b9 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl index b70c482..e0d34b9 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl index fbcc858..2c332d1 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl index 3f485b4..771a89a 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_49b07f(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm index 7477820..f0b9b75 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm
@@ -46,34 +46,34 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %textureGather_49b07f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %35 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 ConstOffset %31 + %20 = OpImageGather %v4uint %25 %28 %int_1 ConstOffset %32 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_49b07f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_49b07f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl index 19cf11b..929e797 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_49b07f() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl index b88180b..cbde492 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_4b8103() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl index 3a7dca0..8baf1a6 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl index 3a7dca0..8baf1a6 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl index 2eeca6e..36dd831 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl index f1604b9..55dd24f 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_4b8103(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm index d995343..6c4365d 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_4b8103 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 ConstOffset %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_4b8103 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_4b8103 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_4b8103 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_4b8103 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_4b8103 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_4b8103 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl index ad5a5a3..9c9e1be 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_4b8103() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl index 974421c..135d996 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32> fn textureGather_4e8ac5() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl index 9c993bb..432c441 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl index 9c993bb..432c441 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl index 8495304..c655ed3 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl index 41a55ca..897cfde 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_4e8ac5(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm index c7ac20a..8f9858a 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_4e8ac5 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_4e8ac5 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_4e8ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_4e8ac5 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_4e8ac5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_4e8ac5 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_4e8ac5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl index 20cd25b..2743c6b 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_4e8ac5() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl index db02a44..1de19ec 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureGather_5266da() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl index a616ea7..751ee8f 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl index a616ea7..751ee8f 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl index 9bc3a28..a9d6fe2 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl index 2082f6a..82d7886 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_5266da(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm index 51c672e..9679774 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_5266da = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 + %19 = OpImageGather %v4float %23 %26 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_5266da +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_5266da OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl index 8db0a99..e9724b2 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5266da() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl index afea32f..8c5306c 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_59372a() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl index 677a356..2670088 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl index 677a356..2670088 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl index dd6f659..dd7eeae 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl index 13183a8..b0498a8 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm index 5a520aa..2e92199 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_59372a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_59372a +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_59372a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_59372a + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_59372a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_59372a + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_59372a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl index e558dea..bf9b38b 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_59372a() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl index c4a4e35..006429c 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32> fn textureGather_5ba85f() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl index 4a550ea..26e6bd9 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl index 4a550ea..26e6bd9 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl index fcb3cf8..87ae300 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl index d0ae481..3f92154 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_5ba85f(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm index 29ef2a4..6b26297 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm
@@ -46,31 +46,31 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %31 = OpConstantNull %v4int - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %textureGather_5ba85f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %31 + %res = OpVariable %_ptr_Function_v4int Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 + %20 = OpImageGather %v4int %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_5ba85f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_5ba85f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl index b25e3f8..8a37d05 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5ba85f() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>()); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl index 3205508..ccf4204 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32> fn textureGather_5bd491() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl index 6c830b8..701563d 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl index 6c830b8..701563d 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl index d96776a..81b595d 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl index 2b48ea5..00e6bf5 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_5bd491(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm index b22abf0..311512a 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm
@@ -46,32 +46,32 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %textureGather_5bd491 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 + %20 = OpImageGather %v4uint %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_5bd491 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_5bd491 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl index 164ec7c..e29865d 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5bd491() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl index e714724..4bdd2e8 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_6b7b74() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl index 18c0977..e304da8 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl index 18c0977..e304da8 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl index 990088c..96fabc0 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl index 21aefeb..2de79ed 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm index 7e7f3eb..6e2a399 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %36 = OpConstantNull %v4uint - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_6b7b74 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %36 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_6b7b74 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_6b7b74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_6b7b74 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_6b7b74 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl index 3cc5160..92e7d14 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_6b7b74() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl index 20e5226..3d5cc89 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> fn textureGather_751f8a() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl index 3f07457..07496e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl index 3f07457..07496e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl index 2fbbc1a..2837f2e 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_751f8a(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm index 3974813..787d887 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_751f8a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureGather_751f8a +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_751f8a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_751f8a + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_751f8a + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl index 7cda70f..9e29ed7 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_751f8a() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl index da9987d..819e6fa 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32> fn textureGather_788010() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl index daf38ed..f7d95cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl index daf38ed..f7d95cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl index 92a80cf..ec066cf 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_788010(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm index c699707..7540d0c 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_788010 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %30 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_788010 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_788010 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_788010 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_788010 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl index dec67b9..2f6772e 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_788010() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl index 24c4da3..942ae7e 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_7c3828() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl index 5efb022..928f915 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl index 5efb022..928f915 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl index 6fcedbf..1f826f7 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl index a8134ee..3b709ae 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_7c3828(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm index 1e1f646..bb909ba 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm
@@ -46,33 +46,33 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %34 = OpConstantNull %v4int + %35 = OpTypeFunction %v4float %textureGather_7c3828 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %34 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 ConstOffset %30 + %20 = OpImageGather %v4int %25 %28 %int_1 ConstOffset %31 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_7c3828 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_7c3828 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl index 339b0ad..05b6166 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_7c3828() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl index 6943197..575556c 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32> fn textureGather_7dd226() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl index 30437f7e..29a4129 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl index 30437f7e..29a4129 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl index 76771fb..ab93c24 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_7dd226(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm index fe15256..0c4fda9 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_7dd226 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_7dd226 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_7dd226 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_7dd226 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_7dd226 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl index d112afc..e178ec2 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_7dd226() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(), 1u); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl index be8e1e5..1dfa2df 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32> fn textureGather_829357() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl index f9d3114..0fae1e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl index f9d3114..0fae1e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl index d71c6ff..b76776c 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_829357(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm index ee1c7cc..c7ffbfb 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_829357 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_829357 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_829357 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_829357 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_829357 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl index f7c7885..713468b 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_829357() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl index 26bbdfe..2e26228 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_831549() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl index b4df239..892b4f3 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl index b4df239..892b4f3 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl index 49e6ad0..dabc82d 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl index 5f2d880..73533b3 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_831549(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm index bba13c2..709654f 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_831549 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_831549 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_831549 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_831549 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_831549 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_831549 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_831549 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl index 45ab25d..35d382c 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_831549() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl index 75f0ea3..be40a06 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32> fn textureGather_8578bc() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl index 3d08469..0b8ccbe 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl index 3d08469..0b8ccbe 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl index d54ba7e..5484cbc 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_8578bc(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm index 9eb633a..efca13c 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_8578bc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %uint_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureGather_8578bc +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_8578bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_8578bc + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_8578bc + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl index d43d26b..1b8d833 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8578bc() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl index 8455ece..128b112 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32> fn textureGather_89680f() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl index 752cd0d..9993543 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl index 752cd0d..9993543 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl index bccb5d2..5d7428e 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl index c7d2c10..cd3b77f 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_89680f(texturecube<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm index 0c208ec..6a811a6 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm
@@ -46,31 +46,31 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %31 = OpConstantNull %v4uint - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %textureGather_89680f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %31 + %res = OpVariable %_ptr_Function_v4uint Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 + %20 = OpImageGather %v4uint %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_89680f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_89680f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl index aeffaac..d9f97fb 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_89680f() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl index acc65ae..dfc7f37 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32> fn textureGather_8b754c() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl index f8ffc7c..09bd5ec 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl index f8ffc7c..09bd5ec 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl index deec62c..2205065 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl index 2bd2f19..55d478d 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_8b754c(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm index 9766976..b47c0d7 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,43 +46,46 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_8b754c = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_8b754c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_8b754c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_8b754c + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_8b754c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_8b754c + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_8b754c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl index 9ff5d77..8f8d037 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8b754c() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl index b30fcdc..c0a8d2b5 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32> fn textureGather_8fae00() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl index f973d36..309ca1d 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl index f973d36..309ca1d 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl index 4b9c91a..d3e13cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl index c1ea9fb..1bcc7c4 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_8fae00(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm index 40ae1c5..aa7bf7f 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm
@@ -46,31 +46,31 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %31 = OpConstantNull %v4uint - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %textureGather_8fae00 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %31 + %res = OpVariable %_ptr_Function_v4uint Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 + %20 = OpImageGather %v4uint %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_8fae00 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_8fae00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl index be62d13..272f02c 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8fae00() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl index aa35c72..ffa5d1b 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32> fn textureGather_92ea47() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl index a5de000..94fb7b7 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl index a5de000..94fb7b7 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl index 33de790..4990c83 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl index f6c3e37..00eb725 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_92ea47(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm index 48e9c34..52d8221 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_92ea47 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %35 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_92ea47 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_92ea47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_92ea47 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_92ea47 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_92ea47 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_92ea47 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl index 501d2df..945fa52 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_92ea47() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl index 3d12e54..10ccd14 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_986700() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl index 33d49eb..55c1085 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl index 33d49eb..55c1085 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl index 4930539..022cc38 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl index 27a6430..c91ad74 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm index 06737d3..d0e948e 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,45 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %33 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4uint + %37 = OpTypeFunction %v4float %textureGather_986700 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %36 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 ConstOffset %31 + %20 = OpImageGather %v4uint %25 %28 %uint_1 ConstOffset %33 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_986700 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_986700 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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 %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_986700 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_986700 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl index ebf125e..b1c4903 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_986700() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl index 06ca1b8..b0f60e5 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> fn textureGather_9a6358() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1i); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl index 57f3d15..a53f003 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl index 57f3d15..a53f003 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl index ba47d8f..7c2be9a 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl index b6f9f68..574220f 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_9a6358(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm index 138fef1..e6c0a1a 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.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 @@ -44,44 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureGather_9a6358 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_9a6358 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_9a6358 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_9a6358 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_9a6358 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_9a6358 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_9a6358 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl index f55dba1..866c99c 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_9a6358() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1i); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl index 5cc0342..cccf583 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_9ab41e() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl index d13137c..b2d02d9 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl index d13137c..b2d02d9 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl index a6d26d4..3c8c9f0 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl index 3af8f5c..b46b1b4 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_9ab41e(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm index d9af9f6..aeefee6 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %37 = OpConstantNull %v4int - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_9ab41e = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %37 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %uint_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_9ab41e +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_9ab41e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_9ab41e + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_9ab41e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_9ab41e + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_9ab41e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl index 71d70bf..db129e4 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_9ab41e() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl index 16deb12..09c36d8 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32> fn textureGather_a0372b() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl index aac3174..1b83181 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl index aac3174..1b83181 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl index 5be694b..ace0faf 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl index 2e34b90..53c065b 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_a0372b(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm index d90e3ce..70fd385 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_a0372b = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %35 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_a0372b +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_a0372b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_a0372b + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_a0372b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_a0372b + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_a0372b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl index cb4dd68..13b48f3 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_a0372b() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl index a3bbec3..7b7b363 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_a68027() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl index b8b6990..67fe27a 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl index b8b6990..67fe27a 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl index 305ef61..e93a788 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl index ef44bea..88b1490 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm index 6e66662..b4fe504 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,51 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureGather_a68027 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 ConstOffset %38 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_a68027 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_a68027 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_a68027 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_a68027 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl index 433101d..29a6f59 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_a68027() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl index a80c3db..4d606ab 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32> fn textureGather_aaf6bd() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl index b7a7ebd..1746c5f 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl index b7a7ebd..1746c5f 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl index e738ae2..c040733 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_aaf6bd(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm index 6f938f5..3c85db7 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_aaf6bd = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %29 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_aaf6bd +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_aaf6bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_aaf6bd + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_aaf6bd + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl index 6d9a186..df39466 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_aaf6bd() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl index fff2898..98d2001 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_af55b3() { - var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl index 11eeb8b..de1d972 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl index 11eeb8b..de1d972 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl index b9e44ef..e76bd21 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl index 292679b..508e894 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_af55b3(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm index ec4850a..8220229 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm
@@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureGather_af55b3 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 ConstOffset %29 + %19 = OpImageGather %v4float %23 %26 %int_1 ConstOffset %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_af55b3 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_af55b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl index 6284434..a229a96 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_af55b3() { - var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl index 44b5d3d..83881aa 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32> fn textureGather_bb3ac5() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl index e893100..caf9dc9 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl index e893100..caf9dc9 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl index a1b2221f..29b1352 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl index 9be015a..13e04f3 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_bb3ac5(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm index 4d5ffe4..70b1404 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm
@@ -46,31 +46,31 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %31 = OpConstantNull %v4int - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %textureGather_bb3ac5 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %31 + %res = OpVariable %_ptr_Function_v4int Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 + %20 = OpImageGather %v4int %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_bb3ac5 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_bb3ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl index 38ac385..53bb85a 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_bb3ac5() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>()); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl index c750140..4b33ea2 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_bd33b6() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl index 243aa01..fc6816d 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl index 243aa01..fc6816d 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl index 54aa26c..26d2694 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl index 85eb095..1c48649 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm index 7d11614..27e924a 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %37 = OpConstantNull %v4int - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_bd33b6 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %37 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %int_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_bd33b6 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_bd33b6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_bd33b6 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_bd33b6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_bd33b6 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_bd33b6 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl index 2f8357e..5fda733 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_bd33b6() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl index ac220e7..e9d4004 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32> fn textureGather_be276f() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl index 1ce11f0..18c39e8 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl index 1ce11f0..18c39e8 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl index 2102740..3161486 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_be276f(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm index a9063fa..b74fcbb 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_be276f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %29 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_be276f +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_be276f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_be276f + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_be276f + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl index 3067707..f7c77f8 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_be276f() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl index cb2ef99..0ab09af 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32> fn textureGather_c0640c() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl index d86b7f2..53c8b4e 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl index d86b7f2..53c8b4e 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl index 2af3667..e115386 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_c0640c(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm index 0f1c649..fd94873 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,43 +46,47 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_c0640c = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %29 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_c0640c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_c0640c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_c0640c + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_c0640c + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl index 5292611..d8531e5 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_c0640c() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl index 4c99b08..b92775d 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32> fn textureGather_ccadde() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl index 6db0b42..33dd7a8 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl index 6db0b42..33dd7a8 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl index 442be7a..444809b 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl index d72fea5..0e7c2a9 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_ccadde(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm index b6cd6d1..9730bc7 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm
@@ -46,32 +46,32 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %textureGather_ccadde = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 + %20 = OpImageGather %v4int %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_ccadde +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_ccadde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl index 95235f3..882bff66 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ccadde() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl index 6eea4f2..4b9cb3d 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_ce5578() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl index b6568c5..789664a 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl index b6568c5..789664a 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl index 9facfd7..f1da0f6 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl index 0429b24..3d69aa1 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm index 92777fb..028e742 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_ce5578 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %37 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %int_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_ce5578 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_ce5578 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_ce5578 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_ce5578 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_ce5578 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_ce5578 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl index d923193..e7bf4f9 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ce5578() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl index 8b24b97..d620c39 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_cf9112() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl index eba887e..bb0b068 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl index eba887e..bb0b068 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl index 914fe38..bf3a3b2 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl index 6692ae7..a6de319 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm index 6c310ce..e8069dd 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %36 = OpConstantNull %v4int - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_cf9112 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %36 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_cf9112 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_cf9112 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_cf9112 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_cf9112 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl index 2bae0ef..564f9d4 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_cf9112() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl index 2552e7d..ccf992d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_d1f187() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl index ad1a98f..a243d4d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl index ad1a98f..a243d4d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl index 442d77a..c3560b3 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl index 1f50d68..10a2701 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d1f187(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm index 369e2a3..6dc0006 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,49 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %36 = OpConstantNull %v4uint - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpConstantNull %v4uint + %41 = OpTypeFunction %v4float %textureGather_d1f187 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %36 + %res = OpVariable %_ptr_Function_v4uint Function %40 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %int_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 ConstOffset %37 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_d1f187 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_d1f187 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_d1f187 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_d1f187 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_d1f187 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_d1f187 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl index f36201f..d1d1604 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d1f187() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl index 418dd84..4bb48af 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32> fn textureGather_d4b5c6() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl index e433e9f..db76898 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl index e433e9f..db76898 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl index bc0c651..b650d7c 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d4b5c6(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm index 1a021e7..b18aa5c 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_d4b5c6 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %30 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_d4b5c6 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_d4b5c6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_d4b5c6 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_d4b5c6 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl index 5d58e82..609c368 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d4b5c6() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl index 8ba6169..073ad9d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_d6507c() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl index 5cff95a..50b89a7 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl index 5cff95a..50b89a7 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl index 784e65a..910608c 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl index 09b4070..b1765cd 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm index 04e9724..c60fde8 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.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 OpMemoryModel Logical GLSL450 @@ -44,44 +44,45 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_d6507c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 ConstOffset %30 + %19 = OpImageGather %v4float %23 %26 %uint_1 ConstOffset %32 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_d6507c +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_d6507c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_d6507c + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d6507c + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl index b30e7d6..dde2df1 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d6507c() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl index ab46f58..0c7ac79 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureGather_d8e958() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl index eebba11..4e15eb9 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl index eebba11..4e15eb9 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl index ce1520f..d16dc37 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl index 0f6d277..7370e3d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d8e958(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm index accc34f..af1b869 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm
@@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_d8e958 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 + %19 = OpImageGather %v4float %23 %26 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_d8e958 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_d8e958 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl index bbc0a35..baa6500 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d8e958() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>()); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl index 88a3639..321c953 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> fn textureGather_d90605() { - var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl index 8a54bc6..2b2b068 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl index 8a54bc6..2b2b068 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl index 5028f86..62ea44e 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl index 90be232..9d7e1fa 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d90605(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm index 38cffa3..13a26f2 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,49 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureGather_d90605 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 ConstOffset %36 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_d90605 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_d90605 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_d90605 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_d90605 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_d90605 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_d90605 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl index d2374c4..67d080c 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_d90605() { - var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl index b78c342..67a70dd 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> fn textureGather_d98d59() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl index 10e683d..847af83 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl index 10e683d..847af83 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl index ca2a849..7b5236f 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_d98d59(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm index 88ac5d0..d431a1a 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_d98d59 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %uint_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_d98d59 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_d98d59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_d98d59 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d98d59 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl index 87129c2..5b2fb59 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d98d59() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl index 8d8fe8a..afce732 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_dc6661() { - var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl index 9a1ecb6..ed4cb87 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl index 9a1ecb6..ed4cb87 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl index 1241fbb..ca5290e 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl index a998cf1..cff8c55 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm index a090bed..dbe25ea 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,45 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %33 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4int + %37 = OpTypeFunction %v4float %textureGather_dc6661 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %36 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 ConstOffset %31 + %20 = OpImageGather %v4int %25 %28 %uint_1 ConstOffset %33 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_dc6661 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_dc6661 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %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 %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_dc6661 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_dc6661 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl index 607129c..2554a6d 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_dc6661() { - var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), vec2<i32>()); + var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl index d0167f4..3b023f5 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32> fn textureGather_e2acac() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl index a3337ec..939783f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl index a3337ec..939783f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl index 23a18ae..1b4d074 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_e2acac(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm index 31bb98c3..a96aeef 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,43 +46,47 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_e2acac = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %29 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_e2acac +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_e2acac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_e2acac + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_e2acac + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl index f1b2b9c..9a2bd67 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e2acac() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl index f1fc888..307415a 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<u32> fn textureGather_e3165f() { - var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl index e5afb5c..64a3795 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl index e5afb5c..64a3795 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl index 914af11..1b7a7d6 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl index 12b0c1d..3fec78a 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_e3165f(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm index 4438901..e068a6b 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_e3165f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %37 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %uint_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_e3165f +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_e3165f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_e3165f + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_e3165f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_e3165f + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_e3165f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl index 9f1dab6..e7641f8 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e3165f() { - var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl index 5f2f74b..2556148 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<i32> fn textureGather_e9d390() { - var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl index 2d2893d..eb97f7f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl index 2d2893d..eb97f7f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl index fc9b73f..783e77d 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl index 2449d25..7b05586 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_e9d390(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm index aa462bc..1918101 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_e9d390 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %int_1 ConstOffset %32 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 ConstOffset %36 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_e9d390 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_e9d390 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_e9d390 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_e9d390 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_e9d390 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_e9d390 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl index 71d137a..4bb6967 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e9d390() { - var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<i32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl index 66b6aca..02e3c9e 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32> fn textureGather_ea8eb4() { - var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl index 3e69b66..1441e14 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl index 3e69b66..1441e14 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl index 4c080b4..a81c2ff 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl index 258c198..8c8a791 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_ea8eb4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm index e7c0ab1..2fbe377 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_ea8eb4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_ea8eb4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_ea8eb4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_ea8eb4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_ea8eb4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_ea8eb4 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_ea8eb4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl index 238176e..9338598 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ea8eb4() { - var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); + var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl index 42582b1..1dccc19 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl
@@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32> fn textureGather_f2c6e3() { - var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res: vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl index a6114a7..e9504c0 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl index a6114a7..e9504c0 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl index 3d5fb84..c720bbc 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGather_f2c6e3(texturecube_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm index 43cb212..9929191 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,44 +46,48 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4uint + %39 = OpTypeFunction %v4float %textureGather_f2c6e3 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %33 + %res = OpVariable %_ptr_Function_v4uint Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %30 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_f2c6e3 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_f2c6e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_f2c6e3 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_f2c6e3 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl index 5f3fd15..d7b38f2 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_f2c6e3() { - var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(), 1i); + var res : vec4<u32> = textureGather(1i, arg_1, arg_2, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl index 23d232d..7255eea 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureGatherCompare_144a9a() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>()); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl index 59db391..e09886a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl index 59db391..e09886a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl index 8c6787a..4e9b3f5 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl index 0d772d3..ec65869 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm index b80ccb6..2080c9c 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureGatherCompare_144a9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGatherCompare_144a9a +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGatherCompare_144a9a + %48 = OpLabel + %49 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGatherCompare_144a9a + %51 = OpLabel + %52 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl index 3645762..e862875 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_144a9a() { - var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl index bbf1123..7ebc626 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_182fd4() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl index 4f6161c..c58d9d6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl index 4f6161c..c58d9d6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl index 2911767..b6a28aa 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl index 5c3e528..4bae14a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_182fd4(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm index f24d780..c86a01e 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureGatherCompare_182fd4 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 OpStore %res %19 OpReturn OpFunctionEnd
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 e1f2612..970f9e0 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<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl index 256e202..5caeb53 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_2e409c() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl index a218553..292a956 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl index a218553..292a956 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl index 30ff99a..266a38a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_2e409c(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1u, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm index 9c8dc27..462fa94 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_2e409c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageDrefGather %v4float %23 %28 %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_2e409c +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_2e409c + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_2e409c + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl index f45cdf9..2ac3798 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_2e409c() { - var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl index bd87b46..aa0a49f 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureGatherCompare_313add() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.f, vec2<i32>()); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl index 3512f9a..e491dd6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl index 3512f9a..e491dd6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl index 7416e88..4c62095 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl index 2b15285..94695aa 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_313add(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1.0f, int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm index 1875a0a..9514a14 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureGatherCompare_313add = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 ConstOffset %29 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 ConstOffset %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_313add +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGatherCompare_313add OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_313add + %41 = OpLabel + %42 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_313add + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd
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 ab31a89..bf4da2a 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<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0f, vec2<i32>()); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl index 1d1b90e..708587c 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_60d2d1() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1i, 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl index 3cc753f..efa458c 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl index 3cc753f..efa458c 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl index b050573..4b8a3dc 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_60d2d1(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm index e5f9745..455ebfd 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_60d2d1 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageDrefGather %v4float %23 %28 %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_60d2d1 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd
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 b7734ea..1c58353 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<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl index 5ca1268..a08f813 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_6d9352() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl index 38bce11..0d45110 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl index 38bce11..0d45110 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl index e1ec032..69d67d8 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl index a5b7ece..d9890db 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_6d9352(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm index 355943fb..a51254d 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureGatherCompare_6d9352 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 OpStore %res %19 OpReturn OpFunctionEnd
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 c6898c2..50afea1 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<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl index 655e44c..ae922ac 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_783e65() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl index 702933d..d3c0caf 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl index 702933d..d3c0caf 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl index bfc941f..5f0ff47 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl index 5c8eb74..99117b5 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_783e65(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm index 6ae28fa..bf059ec 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_783e65 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGatherCompare_783e65 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGatherCompare_783e65 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGatherCompare_783e65 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturn OpFunctionEnd
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 31377a1..d465987 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<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl index d75e00e..287fded 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> vec4<f32> fn textureGatherCompare_b5bc43() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl index 9a9dd99..3712822 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl index 9a9dd99..3712822 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl index 8860940..2558351 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl index e9cc2f5..7f2c077 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_b5bc43(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm index dde1b1d..f44ebac 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_b5bc43 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGatherCompare_b5bc43 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGatherCompare_b5bc43 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGatherCompare_b5bc43 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl index 651c709..47b8417 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_b5bc43() { - var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl index 3b15c8a..24c5b53 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl
@@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureGatherCompare_f585cc() { - var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.f, vec2<i32>()); + var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl index ba3d6fd..7df2b78 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl index ba3d6fd..7df2b78 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl index be0c7bf..69f0437 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl index e6c687e..d04ae1b 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_f585cc(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm index d52aee2..441d09a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %textureGatherCompare_f585cc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 ConstOffset %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGatherCompare_f585cc +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_f585cc + %46 = OpLabel + %47 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGatherCompare_f585cc + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturn OpFunctionEnd
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 212777e..c4a766e 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<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl index 5f879ee..7740c87 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: u32) -> vec4<f32> fn textureLoad_019da0() { - var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl index 170fe3b..a6529f3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_019da0() { - float4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + float4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl index 170fe3b..a6529f3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_019da0() { - float4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + float4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl index faaf797..c50964f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl index 045982a..f65f491 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_019da0(texture3d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + float4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm index eb8a7d1..d3c19e8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_019da0 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_019da0 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_019da0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_019da0 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_019da0 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl index bff3b36..6be5845 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<f32>; fn textureLoad_019da0() { - var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl index 4a46227..c975fc8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: i32) -> vec4<u32> fn textureLoad_026217() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl index 5deed86..9e62a78 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_026217() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl index 5deed86..9e62a78 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_026217() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl index 4647792..cc5bd39 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl index 6b84ada..5b3b457 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_026217(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm index 8bb3a86..e0eeadc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,45 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_026217 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4uint %19 %26 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_026217 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_026217 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_026217 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_026217 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_026217 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_026217 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl index 927fb49..1e8d2fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_026217() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl index a7ebfdf..827a434 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: i32, level: u32) -> f32 fn textureLoad_04b911() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl index 5b1cf98..7f98f2a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl index 5b1cf98..7f98f2a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl index 045c7b80..57a08063 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl index 5b8aa49..c01b94e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_04b911(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm index 29b2cb3..9eb7c41 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,43 +38,46 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_04b911 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_04b911 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_04b911 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_04b911 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_04b911 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_04b911 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_04b911 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl index f1d96a8..6a1b6bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_04b911() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl index 56e1e07..9001543 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: i32, level: i32) -> vec4<i32> fn textureLoad_168dc8() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl index 78a1282..b00f60d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_168dc8() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl index 78a1282..b00f60d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_168dc8() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl index 208d0ce..766be6f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl index 407397f..2563a9a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_168dc8(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm index 635d95a..e212e56 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.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 @@ -40,41 +40,45 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_168dc8 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %23 - %17 = OpImageFetch %v4int %19 %25 Lod %int_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %25 %26 %27 + %17 = OpImageFetch %v4int %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_168dc8 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_168dc8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_168dc8 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_168dc8 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl index 4a87cc4..300c1ce 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_168dc8() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl index 20a8cd8..5a70d33 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32 fn textureLoad_19cf87() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1i); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl index 152b4a7..67e6c7f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - float res = arg_0.Load(int3(0, 0, 1)).x; + float res = arg_0.Load(int3((1).xx, 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl index 152b4a7..67e6c7f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - float res = arg_0.Load(int3(0, 0, 1)).x; + float res = arg_0.Load(int3((1).xx, 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl index baa484d..ca25169 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl index adf9075..1fdb40c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_19cf87(depth2d<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm index 5e9484a..c98b894 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %int_1 + %17 = OpImageFetch %v4float %18 %22 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn
diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl index 9a14b92..118ecdc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_19cf87() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1i); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl index f137b59..658102b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<i32>, array_index: u32, level: u32) -> vec4<u32> fn textureLoad_1b051f() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl index 52b2377..b022c62 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_1b051f() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl index 52b2377..b022c62 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_1b051f() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl index 99a31bb..1d3c84e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl index 77655f2..8de4367a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1b051f(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm index 952a0fb..bbf31ea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.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 @@ -40,41 +40,45 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_1b051f = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %23 - %17 = OpImageFetch %v4uint %19 %25 Lod %uint_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %25 %26 %27 + %17 = OpImageFetch %v4uint %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_1b051f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_1b051f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_1b051f + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_1b051f + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl index 99f3b15..a4543cf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_1b051f() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl index 224ae8b..8fca51e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32> fn textureLoad_1bfdfb() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>()); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl index a4dd107..28536b3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -80,7 +80,7 @@ } void textureLoad_1bfdfb() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl index a4dd107..28536b3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -80,7 +80,7 @@ } void textureLoad_1bfdfb() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl index e65e748..2c2df83 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl
@@ -49,7 +49,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } vec4 vertex_main() { @@ -117,7 +117,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } void fragment_main() { @@ -179,7 +179,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl index e5b7c01..dfb5020 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl
@@ -58,7 +58,7 @@ } void textureLoad_1bfdfb(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(0u), *(tint_symbol_3)); + float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(1u), *(tint_symbol_3)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm index 4ac1277..72a5227 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -114,7 +114,7 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %118 = OpConstantNull %v2uint + %118 = OpConstantComposite %v2uint %uint_1 %uint_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl index a67b2bf..0f0f7e5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_1bfdfb() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>()); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl index 147ef2e..a58f7f1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32> fn textureLoad_1c562a() { - var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl index 69fa517..105cec9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + uint4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl index 69fa517..105cec9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + uint4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl index 5d0ca1b..a2ea319 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl index 08ec833..d302202 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + uint4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm index 3aab4ea..715a68f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl index a62fc0f..18a8b91 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<u32>; fn textureLoad_1c562a() { - var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl index b81858c..7076b0d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: i32) -> vec4<f32> fn textureLoad_1f2016() { - var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl index 7eba4d9..4c90af7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_1f2016() { - float4 res = arg_0.Load(int4(0, 0, 0, 1)); + float4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl index 7eba4d9..4c90af7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_1f2016() { - float4 res = arg_0.Load(int4(0, 0, 0, 1)); + float4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl index 0fd2eaa..7665fa9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl index fce3e6c..4b467ff 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1f2016(texture3d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(int3(0)), 1); + float4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm index 6717fa1..d4b7a52 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl index dfb4e0b..0f12804 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<f32>; fn textureLoad_1f2016() { - var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl index ac39ee5..9b748d3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32> fn textureLoad_21d1c4() { - var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl index 04e91b0..9bb0b90 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_21d1c4() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + float4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl index 04e91b0..9bb0b90 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_21d1c4() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + float4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl index 6d8e740..22257eb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl index a18d7cf..d0e07c0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + float4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm index ca20303..10c41ba 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl index 2cfba76..6f8836b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<f32>; fn textureLoad_21d1c4() { - var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl index c31e51d..3fcb072 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: i32) -> vec4<i32> fn textureLoad_223246() { - var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl index c434c8c..eb9abb9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_223246() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + int4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl index c434c8c..eb9abb9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_223246() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + int4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl index 39f77c1..b9e9662 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl index 3372521..f2a55f3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_223246(texture3d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + int4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm index bba82c9..f047829 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %22 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_223246 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %int_1 + %17 = OpImageFetch %v4int %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_223246 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_223246 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_223246 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_223246 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl index 1a14589..fca4b78 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<i32>; fn textureLoad_223246() { - var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl index 4d77af6..f0c424d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: i32, level: u32) -> vec4<i32> fn textureLoad_2363be() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl index 1fcee1b..eaad1bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_2363be() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl index 1fcee1b..eaad1bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_2363be() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl index 1854c65..9b0a59d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl index 2281819..bccc5c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2363be(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm index 35dce1e..8913113 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 - %int_1 = OpConstant %int 1 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 + %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpConstantNull %v4int - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2363be = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %23 - %17 = OpImageFetch %v4int %19 %25 Lod %uint_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %25 %26 %27 + %17 = OpImageFetch %v4int %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_2363be +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_2363be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_2363be + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_2363be OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_2363be + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_2363be OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl index 295dadc..2a5b51f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_2363be() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl index 102ca0b..8e7407e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: u32) -> vec4<f32> fn textureLoad_2d479c() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl index 48743d7..14a97df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_2d479c() { - float4 res = arg_0.Load(int3(0, 0, int(1u))); + float4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl index 48743d7..14a97df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_2d479c() { - float4 res = arg_0.Load(int3(0, 0, int(1u))); + float4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl index 480acb7..baf0eac 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl index 64a9fa9..918c872 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2d479c(texture2d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm index ea0f240..d56c68c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2d479c = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_2d479c +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_2d479c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_2d479c + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_2d479c + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl index 93532d7..33dcc85 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<f32>; fn textureLoad_2d479c() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl index c202f48..f62ef1d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: u32) -> vec4<f32> fn textureLoad_2e09aa() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl index 9cc10ce..fcb6480 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_2e09aa() { - float4 res = arg_0.Load((0u).xx, 1u); + float4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl index 9cc10ce..fcb6480 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_2e09aa() { - float4 res = arg_0.Load((0u).xx, 1u); + float4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl index 1fc3bfb..630e2fa 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl index 48b5ac4..3ae89d4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm index 1964e30..cce0307 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %uint_1 + %16 = OpImageFetch %v4float %17 %21 Sample %uint_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl index ca4270f..58a8595 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>; fn textureLoad_2e09aa() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl index 1ba95c1..098f8ed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<i32>, sample_index: u32) -> vec4<i32> fn textureLoad_38f8ab() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl index b32e2f0..1e31cb2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int4 res = arg_0.Load((0).xx, 1u); + int4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl index b32e2f0..1e31cb2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int4 res = arg_0.Load((0).xx, 1u); + int4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl index 199f0a9..696e66a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl index 062a78c..889349b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_38f8ab(texture2d_ms<int, access::read> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm index 5bcd7ad..d440a8a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_38f8ab = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Sample %uint_1 + %17 = OpImageFetch %v4int %19 %22 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_38f8ab +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_38f8ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_38f8ab + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_38f8ab + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl index 0a81a11..a97ddc2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>; fn textureLoad_38f8ab() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl index f3db7a0..f829c89 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<i32>, array_index: u32, level: u32) -> vec4<f32> fn textureLoad_3c96e8() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl index 1b18d6f..d280db1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_3c96e8() { - float4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl index 1b18d6f..d280db1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_3c96e8() { - float4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl index 712a973..92d7508 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl index 468cb47..ad54598 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3c96e8(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm index 4aaf7c8..479336b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3c96e8 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %uint_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_3c96e8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_3c96e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_3c96e8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_3c96e8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl index 487fe60..a4d17d7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_3c96e8() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl index a7f50c3..7668515 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: i32) -> vec4<i32> fn textureLoad_3d3fd1() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl index f31c316..5ad0afa 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl index f31c316..5ad0afa 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl index 9d295c5..4792dc9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl index 63fddeb..c19db9b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3d3fd1(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm index 73e3401..430ee7f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,44 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3d3fd1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %24 Lod %int_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpCompositeConstruct %v3uint %25 %26 %uint_1 + %17 = OpImageFetch %v4int %19 %27 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_3d3fd1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_3d3fd1 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_3d3fd1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl index a053554..2175060 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_3d3fd1() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl index d677077..6fd6433 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: i32) -> vec4<f32> fn textureLoad_439e2a() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl index 04be847..eadf395 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_439e2a() { - float4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + float4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl index 04be847..eadf395 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_439e2a() { - float4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + float4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl index 3e1a9c9..0b40108 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl index 9a44d70..8908484 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_439e2a(texture2d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm index bd14760..81e00fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_439e2a = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_439e2a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_439e2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_439e2a + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_439e2a + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl index 0cc7d74..2d369bc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<f32>; fn textureLoad_439e2a() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl index eb46b20..dc25830c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: i32, level: u32) -> vec4<f32> fn textureLoad_46a93f() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl index efe3b08..4342746 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_46a93f() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl index efe3b08..4342746 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_46a93f() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl index ba12442..1fb6bc8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl index 06c32ea..3329dec 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_46a93f(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm index a294467..c241fcb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.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 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_46a93f = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %uint_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_46a93f +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_46a93f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_46a93f + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_46a93f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_46a93f + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_46a93f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl index f5a4417..3113448 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_46a93f() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl index 76e9718..90aa004 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32> fn textureLoad_47e818() { - var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl index a0f9ce2..8c4b83d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_47e818() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + int4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl index a0f9ce2..8c4b83d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_47e818() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + int4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl index 78f7a1c..029590a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl index 91e3739..6ecc7e3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + int4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm index fbb4de7..4c8586c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %22 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl index 3f95949..6136a75 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<i32>; fn textureLoad_47e818() { - var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl index e7383c5..daeb8ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: i32) -> vec4<f32> fn textureLoad_484344() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl index 4c68236..89d6153 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_484344() { - float4 res = arg_0.Load(int3(0, 0, 1)); + float4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl index 4c68236..89d6153 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_484344() { - float4 res = arg_0.Load(int3(0, 0, 1)); + float4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl index 121a7a6..fadc4d6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl index 00171e5..c216bdd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_484344(texture2d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm index 14bf5a5..a3f3250 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl index 2b3cc7d..d9f4d56 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<f32>; fn textureLoad_484344() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl index d4e1195..ccf8f01 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: u32) -> vec4<u32> fn textureLoad_49f76f() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl index 6152f02..173f0f3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint4 res = arg_0.Load((0u).xx, 1u); + uint4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl index 6152f02..173f0f3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint4 res = arg_0.Load((0u).xx, 1u); + uint4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl index 4f67942..345b3ce 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl index cae2ed1..b4f6aa4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm index 12cfa42..9e7b602 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Sample %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl index b1ad019..11774fa5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>; fn textureLoad_49f76f() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl index 82d2b57..5b9f223 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<i32>, array_index: u32, level: i32) -> vec4<f32> fn textureLoad_4acb64() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl index 21f231b..eb2d9c4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_4acb64() { - float4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl index 21f231b..eb2d9c4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_4acb64() { - float4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl index 0490887..af90d6c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl index 247c9fc..390a2d2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4acb64(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm index 1fcd8ec..b77fa30 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.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 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_4acb64 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %int_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_4acb64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_4acb64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_4acb64 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_4acb64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_4acb64 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_4acb64 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl index f55bd6b..b3783d9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_4acb64() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl index 3418786..c16d5b6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: u32) -> f32 fn textureLoad_4db25c() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl index 13ff0ba..ba4ee5f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_4db25c() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl index 13ff0ba..ba4ee5f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_4db25c() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl index ddef4d9..2b58f65 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl index 28efe98..c1f80e6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm index 27c7101..32be0e4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %uint_1 + %17 = OpImageFetch %v4float %18 %22 Sample %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn
diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl index 467f37a..016d7b3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_4db25c() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl index fcc4f40..0cab940 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: i32) -> vec4<i32> fn textureLoad_4fd803() { - var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl index 2fe1770..6d0e1ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_4fd803() { - int4 res = arg_0.Load(int4(0, 0, 0, 1)); + int4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl index 2fe1770..6d0e1ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_4fd803() { - int4 res = arg_0.Load(int4(0, 0, 0, 1)); + int4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl index b5ca069..6b6428c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl index e72afeb..b3c9573 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4fd803(texture3d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(int3(0)), 1); + int4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm index a288c46..09c742b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %int_1 + %17 = OpImageFetch %v4int %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl index 5545559..60d259e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<i32>; fn textureLoad_4fd803() { - var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl index 86eb297..c02faf2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: i32, level: i32) -> vec4<u32> fn textureLoad_53e142() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl index 7485817..3aa59fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_53e142() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl index 7485817..3aa59fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_53e142() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl index 60635a4..2784890 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl index b7c7b22..bff4dce 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_53e142(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm index 47244e5d..0d6f864 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.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 @@ -39,42 +39,46 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_53e142 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4uint %19 %25 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4uint %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_53e142 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_53e142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_53e142 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_53e142 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl index 741a7f0..61ac9cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_53e142() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl index 0cd6406..8709118 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: i32, level: i32) -> vec4<f32> fn textureLoad_54a59b() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl index 37fc597..05c3ea6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_54a59b() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl index 37fc597..05c3ea6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_54a59b() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl index 1cbdc29..d0261ec 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl index 05527a5..76de435 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_54a59b(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm index 14f2601..a74c27d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_54a59b = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %int_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_54a59b +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_54a59b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_54a59b + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_54a59b + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl index bf69b5d..501de96 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_54a59b() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl index 0e460bb..6a412e6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: i32) -> vec4<u32> fn textureLoad_6154d4() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl index 1aedcd2..515b575 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_6154d4() { - uint4 res = arg_0.Load(int3(0, 0, 1)); + uint4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl index 1aedcd2..515b575 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_6154d4() { - uint4 res = arg_0.Load(int3(0, 0, 1)); + uint4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl index 017e004..7ec67ea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl index d71292e..26372cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6154d4(texture2d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm index 5720f46..9601d63 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl index 8238d07..59fe73e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<u32>; fn textureLoad_6154d4() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl index 988633f..a30de18 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: i32) -> f32 fn textureLoad_6273b1() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1i); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl index fafcd35..599f9fb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_6273b1() { - float res = arg_0.Load(int3(0, 0, 0), 1).x; + float res = arg_0.Load(int3((1).xx, 0), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl index fafcd35..599f9fb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_6273b1() { - float res = arg_0.Load(int3(0, 0, 0), 1).x; + float res = arg_0.Load(int3((1).xx, 0), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl index 3cfe277..9da482c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl index e39caca..fd32c20 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm index 5db1880..58aacb9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %int_1 + %17 = OpImageFetch %v4float %18 %22 Sample %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn
diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl index 6c19c4a..ad54e19 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6273b1() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1i); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl index 9311705..464ee33 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: u32) -> vec4<i32> fn textureLoad_639962() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl index 42bb7f1..135287e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_639962() { - int4 res = arg_0.Load((0u).xx, 1u); + int4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl index 42bb7f1..135287e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_639962() { - int4 res = arg_0.Load((0u).xx, 1u); + int4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl index 40ede06..b7f55c8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl index c0022d9..ac9b81f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm index 2c8ccab..9dab4a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Sample %uint_1 + %17 = OpImageFetch %v4int %19 %23 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl index f7aa89a..1b47969 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>; fn textureLoad_639962() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl index 11c7cb5..34e2fd1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<i32>, array_index: i32, level: u32) -> vec4<u32> fn textureLoad_656d76() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl index bf91da0..3d3a154 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_656d76() { - uint4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl index bf91da0..3d3a154 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_656d76() { - uint4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl index 3aad010..28f6396 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl index a992774..bc1b598 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_656d76(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm index 0b2bd2b..29e4722 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,44 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %24 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_656d76 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %24 Lod %uint_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpCompositeConstruct %v3int %25 %26 %int_1 + %17 = OpImageFetch %v4uint %19 %27 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_656d76 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_656d76 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_656d76 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_656d76 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_656d76 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_656d76 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl index a7a3ebd..8f0880b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_656d76() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl index 7014871..88c8732 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: u32, level: u32) -> f32 fn textureLoad_66be47() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl index 73885a2..d8dfa1d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - float res = arg_0.Load(int4(0, 0, int(1u), int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl index 73885a2..d8dfa1d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - float res = arg_0.Load(int4(0, 0, int(1u), int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl index f8185c1..5ae469f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl index 17fef2f..f939f98 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_66be47(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm index 990ebb0..75d29e2b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,46 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_66be47 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_66be47 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_66be47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_66be47 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_66be47 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl index 1832e29..74559b9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_66be47() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl index 2b8177e..9ddd349 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<i32>, sample_index: u32) -> f32 fn textureLoad_6925bc() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1u); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl index ccd6a22..f0c82ff 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_6925bc() { - float res = arg_0.Load(int3(0, 0, 0), 1u).x; + float res = arg_0.Load(int3((1).xx, 0), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl index ccd6a22..f0c82ff 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_6925bc() { - float res = arg_0.Load(int3(0, 0, 0), 1u).x; + float res = arg_0.Load(int3((1).xx, 0), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl index 76b2acd..0dec904 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl index 97acbd3..2ffbebe 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6925bc(depth2d_ms<float, access::read> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm index cda1ac2..7a5ea4e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.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 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6925bc = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %uint_1 + %17 = OpImageFetch %v4float %18 %22 Sample %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_6925bc +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_6925bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_6925bc + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_6925bc + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl index 14dd184..e75432f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6925bc() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1u); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl index 3ef2937..43e349c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: u32) -> vec4<u32> fn textureLoad_6bf4b7() { - var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl index 8012b52..8a41510 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - uint4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + uint4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl index 8012b52..8a41510 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - uint4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + uint4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl index 87a337c..5ae612b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl index 0fa3b97..ddac3e7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6bf4b7(texture3d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + uint4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm index 74c96d6..4f756fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6bf4b7 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_6bf4b7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_6bf4b7 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_6bf4b7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl index 87ee760..07d7ba6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<u32>; fn textureLoad_6bf4b7() { - var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl index 784ea18..2e6d30a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32> fn textureLoad_714471() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl index c201b76..7982262 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_714471() { - int4 res = arg_0.Load(uint3(0u, 0u, 1u)); + int4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl index c201b76..7982262 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_714471() { - int4 res = arg_0.Load(uint3(0u, 0u, 1u)); + int4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl index 16a781c..3131d47 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl index dfe204f..cf68b69 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm index 845ee95..12ce134 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl index b6f83de..638bd91 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<i32>; fn textureLoad_714471() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl index dcfb039..a3698ed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<i32>, array_index: i32, level: u32) -> vec4<f32> fn textureLoad_789045() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl index 7c7ed8d..4ff5d93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_789045() { - float4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl index 7c7ed8d..4ff5d93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_789045() { - float4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl index 9e596c1..4e4fbf8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl index 903adf9..be0339f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_789045(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm index 7398fc6..013a260 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,44 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_789045 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %uint_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + %16 = OpImageFetch %v4float %17 %25 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_789045 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_789045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_789045 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_789045 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_789045 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_789045 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl index 10a00a2..d104278 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_789045() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl index 5e359e3..c966379 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<i32> fn textureLoad_79e697() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl index 336b2ab..0c1d428 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_79e697() { - int4 res = arg_0.Load(int4(0, 0, 1, 1)); + int4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl index 336b2ab..0c1d428 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_79e697() { - int4 res = arg_0.Load(int4(0, 0, 1, 1)); + int4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl index 4e5a1df..82d11ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl index 3e8f37d..cb7faf1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_79e697(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm index 8a90068..3e48766 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,43 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_79e697 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %29 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %23 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4int %19 %26 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_79e697 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_79e697 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_79e697 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_79e697 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_79e697 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_79e697 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl index c2cda3d..fd39584 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_79e697() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl index efd577e..266c389 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<i32>, array_index: u32, level: i32) -> vec4<u32> fn textureLoad_7ab4df() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl index b6d28d8..30e23b4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_7ab4df() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl index b6d28d8..30e23b4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_7ab4df() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl index ec80f3b..66522c5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl index b4ea0ff..f9e6924 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7ab4df(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm index 14ec9cc..5239cbe 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 - %uint_1 = OpConstant %uint 1 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 + %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpConstantNull %v4uint - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7ab4df = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %23 - %17 = OpImageFetch %v4uint %19 %25 Lod %int_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %25 %26 %27 + %17 = OpImageFetch %v4uint %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_7ab4df +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_7ab4df OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_7ab4df + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_7ab4df OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_7ab4df + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_7ab4df OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl index 1641a45..5377bd3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_7ab4df() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl index 0c629f1..beea60d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: u32) -> f32 fn textureLoad_7b63e0() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl index fd429fc..8244761 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl index fd429fc..8244761 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl index 9e3335b..ff50479 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl index 16c3883..9abd6c7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm index 7619398..6656cd0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.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 @@ -38,40 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7b63e0 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4float %18 %26 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_7b63e0 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureLoad_7b63e0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_7b63e0 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_7b63e0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_7b63e0 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_7b63e0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl index 9f9e633..239a544 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_7b63e0() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl index 9f17dfd..748948b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<u32>, sample_index: i32) -> vec4<i32> fn textureLoad_7bee94() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl index 637fedd..693590e1a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_7bee94() { - int4 res = arg_0.Load((0u).xx, 1); + int4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl index 637fedd..693590e1a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_7bee94() { - int4 res = arg_0.Load((0u).xx, 1); + int4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl index 0b65e8b..bfebea4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl index 3b6dd3b..dfa9ee3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7bee94(texture2d_ms<int, access::read> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm index 6cebf88..e0dee27 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7bee94 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Sample %int_1 + %17 = OpImageFetch %v4int %19 %23 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_7bee94 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_7bee94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_7bee94 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_7bee94 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl index a0dce1f..8c33199 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>; fn textureLoad_7bee94() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl index 83f84c1..8964b48 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<u32> fn textureLoad_7c90e5() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl index 789b7c2..2f4abe7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_7c90e5() { - uint4 res = arg_0.Load(int4(0, 0, 1, 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl index 789b7c2..2f4abe7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_7c90e5() { - uint4 res = arg_0.Load(int4(0, 0, 1, 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl index f215804..1df83b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl index 845b819..234f4e9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7c90e5(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm index eca2714..03d6263 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.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 @@ -40,40 +40,43 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %24 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %27 = OpConstantNull %v4uint - %28 = OpTypeFunction %v4float + %30 = OpConstantNull %v4uint + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7c90e5 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %30 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %24 Lod %int_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpCompositeConstruct %v3int %25 %26 %int_1 + %17 = OpImageFetch %v4uint %19 %27 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_7c90e5 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_7c90e5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_7c90e5 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_7c90e5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_7c90e5 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_7c90e5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl index 4e9bfb5..4a75a29 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_7c90e5() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl index 114529e..70a9779 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: i32) -> f32 fn textureLoad_7fd822() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1i); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl index c7fda0b..873d58f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - float res = arg_0.Load(uint3(0u, 0u, uint(1))).x; + float res = arg_0.Load(uint3((1u).xx, uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl index c7fda0b..873d58f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - float res = arg_0.Load(uint3(0u, 0u, uint(1))).x; + float res = arg_0.Load(uint3((1u).xx, uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl index 190b3ba..fd8f548 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl index ae2db23..6d825c1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7fd822(depth2d<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm index afc51da..8eb5347 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.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 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7fd822 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %int_1 + %17 = OpImageFetch %v4float %18 %22 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_7fd822 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_7fd822 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_7fd822 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_7fd822 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl index 27d783f..8085a1c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_7fd822() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1i); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl index 8a57894..d2acc42 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32> fn textureLoad_84dee1() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl index 44ec101..ff8c041 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_84dee1() { - float4 res = arg_0.Load(uint3(0u, 0u, 1u)); + float4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl index 44ec101..ff8c041 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<float4> arg_0 : register(t0, space1); void textureLoad_84dee1() { - float4 res = arg_0.Load(uint3(0u, 0u, 1u)); + float4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl index 61255d3..7591aea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl index f487844..f078b11 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm index 06cffb7..0ec3c1c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl index 8c71828..208a704 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<f32>; fn textureLoad_84dee1() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl index 30e2321..538bce5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<u32> fn textureLoad_8527b1() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl index 996ba2b..efe6675 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl index 996ba2b..efe6675 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl index d8b25ad..b2dd9c5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl index 925232e..90a940f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm index a5774fc..a761158 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,43 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8527b1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %29 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4uint %19 %26 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_8527b1 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_8527b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_8527b1 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_8527b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_8527b1 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_8527b1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl index 0c8f290..b54aad1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_8527b1() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl index 764a1c5..8d2249e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<f32> fn textureLoad_87be85() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl index 630c1d1..46729c6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_87be85() { - float4 res = arg_0.Load(int4(0, 0, 1, 1)); + float4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl index 630c1d1..46729c6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_87be85() { - float4 res = arg_0.Load(int4(0, 0, 1, 1)); + float4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl index 4d27344..29b9790 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl index 7d1b36f8..91e436d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_87be85(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm index 398d48c..cf811e4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,42 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_87be85 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %int_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + %16 = OpImageFetch %v4float %17 %25 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_87be85 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_87be85 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_87be85 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_87be85 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_87be85 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_87be85 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl index 1aa41cb..d99ca4e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_87be85() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl index 1f056a2..4e672d3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32> fn textureLoad_897cf3() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl index c099bb5..af0a0d2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint4 res = arg_0.Load(uint3(0u, 0u, 1u)); + uint4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl index c099bb5..af0a0d2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint4 res = arg_0.Load(uint3(0u, 0u, 1u)); + uint4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl index e77f26b..cf52a14 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl index dfbe3e3..d0a6e41 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm index d6fb44d..1203f24 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl index 4acf456..abaebd3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<u32>; fn textureLoad_897cf3() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl index c0a16ad..7b35415 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32> fn textureLoad_8acf41() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>()); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl index 33ee497..ef621cb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl
@@ -80,7 +80,7 @@ } void textureLoad_8acf41() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl index 33ee497..ef621cb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl
@@ -80,7 +80,7 @@ } void textureLoad_8acf41() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl index 2667743..88a7e3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl
@@ -49,7 +49,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } vec4 vertex_main() { @@ -117,7 +117,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } void fragment_main() { @@ -179,7 +179,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl index 617b8df..93bf9c8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl
@@ -58,7 +58,7 @@ } void textureLoad_8acf41(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, int2(0), *(tint_symbol_3)); + float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, int2(1), *(tint_symbol_3)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm index 6eba59e..9929412 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 138 +; Bound: 139 ; Schema: 0 OpCapability Shader %28 = OpExtInstImport "GLSL.std.450" @@ -114,11 +114,12 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %118 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %119 = OpConstantComposite %v2int %int_1 %int_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %125 = OpTypeFunction %v4float + %126 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %22 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -215,31 +216,31 @@ %res = OpVariable %_ptr_Function_v4float Function %5 %116 = OpLoad %11 %arg_0 %117 = OpLoad %11 %ext_tex_plane_1 - %121 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %122 = OpLoad %ExternalTextureParams %121 - %115 = OpFunctionCall %v4float %textureLoadExternal %116 %117 %118 %122 + %122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %123 = OpLoad %ExternalTextureParams %122 + %115 = OpFunctionCall %v4float %textureLoadExternal %116 %117 %119 %123 OpStore %res %115 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %125 - %127 = OpLabel - %128 = OpFunctionCall %void %textureLoad_8acf41 +%vertex_main_inner = OpFunction %v4float None %126 + %128 = OpLabel + %129 = OpFunctionCall %void %textureLoad_8acf41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %111 - %130 = OpLabel - %131 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %131 + %131 = OpLabel + %132 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %132 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %111 - %133 = OpLabel - %134 = OpFunctionCall %void %textureLoad_8acf41 + %134 = OpLabel + %135 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %111 - %136 = OpLabel - %137 = OpFunctionCall %void %textureLoad_8acf41 + %137 = OpLabel + %138 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl index 9539b700..5577b26 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_8acf41() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>()); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl index b5d0434..436c43a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: u32) -> f32 fn textureLoad_8ccbe3() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1u); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl index 6f96b70..bd1f283 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - float res = arg_0.Load(int3(0, 0, int(1u))).x; + float res = arg_0.Load(int3((1).xx, int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl index 6f96b70..bd1f283 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - float res = arg_0.Load(int3(0, 0, int(1u))).x; + float res = arg_0.Load(int3((1).xx, int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl index ece7afb..d700b3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl index ac493ed..b53534c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8ccbe3(depth2d<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm index 74a1be6..4333057 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.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 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8ccbe3 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %uint_1 + %17 = OpImageFetch %v4float %18 %22 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_8ccbe3 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_8ccbe3 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_8ccbe3 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl index ed51a5e..3128d1e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_8ccbe3() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1u); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl index caf7225..75a6136 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: i32) -> vec4<u32> fn textureLoad_92eb1f() { - var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl index f6223be..27f26d4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl index f6223be..27f26d4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl index 17377b3..03a01dc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl index 1ccb382..a71ae9c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_92eb1f(texture3d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + uint4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm index 0660252..f9adb7a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_92eb1f = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_92eb1f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_92eb1f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_92eb1f + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_92eb1f + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl index e6000a2..a09f3b3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<u32>; fn textureLoad_92eb1f() { - var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl index 2a5a5d7..6702db2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<f32> fn textureLoad_96efd5() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl index 67c4f1b..d31d27a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_96efd5() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl index 67c4f1b..d31d27a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_96efd5() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl index f3f8f17..93f63df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl index 3f9f55f..68bce43 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm index e75371c..95d4da6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,42 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_96efd5 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %uint_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + %16 = OpImageFetch %v4float %17 %25 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_96efd5 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_96efd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_96efd5 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_96efd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_96efd5 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_96efd5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl index d6f1fec..c335e7c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_96efd5() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl index 7932e4f..41979d9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<u32>, array_index: u32, level: u32) -> vec4<i32> fn textureLoad_9885b0() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl index 1362ee5..a284ba8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9885b0() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl index 1362ee5..a284ba8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9885b0() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl index 37d02a3..8ae9074 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl index 9962116..843028c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm index 4f1bcb5..95cbcb3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.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 @@ -40,40 +40,43 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %27 = OpConstantNull %v4int - %28 = OpTypeFunction %v4float + %30 = OpConstantNull %v4int + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9885b0 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %30 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %24 Lod %uint_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpCompositeConstruct %v3uint %25 %26 %uint_1 + %17 = OpImageFetch %v4int %19 %27 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_9885b0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_9885b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_9885b0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_9885b0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_9885b0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_9885b0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl index 0c52bf4..5f84beb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_9885b0() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1u, 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl index 35fef29..80fb11e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: i32) -> vec4<i32> fn textureLoad_9aa733() { - var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl index 79162bd..8862e3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_9aa733() { - int4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + int4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl index 79162bd..8862e3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_9aa733() { - int4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + int4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl index 217cfa1..79c181b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl index 961e4e3..b1598518 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9aa733(texture2d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm index 6e614d2..d58cf9e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9aa733 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %int_1 + %17 = OpImageFetch %v4int %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_9aa733 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_9aa733 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_9aa733 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_9aa733 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl index 10a785e..16e206d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<i32>; fn textureLoad_9aa733() { - var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl index 5949f7d..d3628ce 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32 fn textureLoad_9b2667() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl index a17fb57..6504431f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - float res = arg_0.Load(int4(0, 0, 1, 1)).x; + float res = arg_0.Load(int4(int3((1).xx, 1), 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl index a17fb57..6504431f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - float res = arg_0.Load(int4(0, 0, 1, 1)).x; + float res = arg_0.Load(int4(int3((1).xx, 1), 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl index bc2e629..6b28c51 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl index 5b2788d..594a572 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9b2667(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm index 7b99003..83123f0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.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 @@ -38,40 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9b2667 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4float %18 %26 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_9b2667 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureLoad_9b2667 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_9b2667 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_9b2667 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_9b2667 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_9b2667 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl index 16ef986..1cf5e1c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_9b2667() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1i, 1i); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl index e666bb0..0902bff 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<i32>, array_index: i32, level: u32) -> vec4<i32> fn textureLoad_9d70e9() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl index 0e3ab66..0f72bb7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl index 0e3ab66..0f72bb7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl index 3d13c69..9db5445 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl index da97933..4571e17 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9d70e9(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm index ef88f71..935921c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,45 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9d70e9 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4int %19 %26 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_9d70e9 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_9d70e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_9d70e9 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_9d70e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_9d70e9 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_9d70e9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl index d1bbb29..4e40023 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_9d70e9() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl index d14a733..d371de4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32 fn textureLoad_9ed19e() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl index 589c875..097458e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - float res = arg_0.Load(uint3(0u, 0u, 1u)).x; + float res = arg_0.Load(uint3((1u).xx, 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl index 589c875..097458e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - float res = arg_0.Load(uint3(0u, 0u, 1u)).x; + float res = arg_0.Load(uint3((1u).xx, 1u)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl index a973885..3e9d565 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl index 0e15d47..e602994 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm index c4d6e10..1732f24 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %uint_1 + %17 = OpImageFetch %v4float %18 %22 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn
diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl index a4f6f1f..616cbee 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_9ed19e() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl index 1cd4b77..83c3e93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<i32>, array_index: u32, level: u32) -> vec4<i32> fn textureLoad_9fbfd9() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl index cc0b741..80664b9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl index cc0b741..80664b9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl index 8cdbcc7..56966fe 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl index 4c392b8..3ce02b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9fbfd9(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm index b76f91a..d7b72c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.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 @@ -39,42 +39,46 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9fbfd9 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4int %19 %25 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4int %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_9fbfd9 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_9fbfd9 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_9fbfd9 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl index 6de6866..de62644 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_9fbfd9() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u, 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl index 6b197d8..ac921a3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<u32>, array_index: i32, level: u32) -> vec4<u32> fn textureLoad_a24be1() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl index 1570879..bb3431e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl index 1570879..bb3431e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<uint4> arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl index 1e9bb6c..f0ccba1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl index c025426..d23a41d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a24be1(texture2d_array<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm index 4182dea..76b41b4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,43 +39,46 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpConstantNull %v4uint - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_a24be1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4uint %19 %25 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4uint %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_a24be1 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_a24be1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_a24be1 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_a24be1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_a24be1 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_a24be1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl index e938574..626e827 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<u32>; fn textureLoad_a24be1() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i, 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl index 5a7af60..ecf3176 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<i32>, sample_index: i32) -> vec4<f32> fn textureLoad_a583c9() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl index e7bcc42..899ff24 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_a583c9() { - float4 res = arg_0.Load((0).xx, 1); + float4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl index e7bcc42..899ff24 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_a583c9() { - float4 res = arg_0.Load((0).xx, 1); + float4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl index af89b5f..946647d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl index 7bcc2d6..a80c05e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a583c9(texture2d_ms<float, access::read> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm index 92defe1..e87546e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm
@@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %int_1 + %16 = OpImageFetch %v4float %17 %21 Sample %int_1 OpStore %res %16 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl index 4fadbce..14a43a6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>; fn textureLoad_a583c9() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl index 8618d3c..200ddd1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: i32) -> vec4<u32> fn textureLoad_a9a9f5() { - var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl index 9673f0e..49cda15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - uint4 res = arg_0.Load(int4(0, 0, 0, 1)); + uint4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl index 9673f0e..49cda15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<uint4> arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - uint4 res = arg_0.Load(int4(0, 0, 0, 1)); + uint4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl index 6749d78..aa54ff3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl index 16840f0..f6c9bdb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a9a9f5(texture3d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(int3(0)), 1); + uint4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm index c635f15..0c42002 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl index 03686f0..f6df350 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<u32>; fn textureLoad_a9a9f5() { - var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl index 0430762..3dfd2f1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<i32>, array_index: u32, level: i32) -> vec4<i32> fn textureLoad_b29f71() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl index 6e13a63..3a5de15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_b29f71() { - int4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl index 6e13a63..3a5de15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<int4> arg_0 : register(t0, space1); void textureLoad_b29f71() { - int4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl index 68402f9..f6920c3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl index 2ee5823..9a49097 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b29f71(texture2d_array<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm index dc7ad1c..8df6b91 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,43 +39,46 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpConstantNull %v4int - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b29f71 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4int %19 %25 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4int %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_b29f71 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_b29f71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_b29f71 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_b29f71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_b29f71 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_b29f71 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl index ff9172d..c83bd68 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<i32>; fn textureLoad_b29f71() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl index 3839395..68177d1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: i32, level: i32) -> f32 fn textureLoad_b6ba5d() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl index e01eb1d..3631e3b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl index e01eb1d..3631e3b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl index aa48aab..183125f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl index e2c7340..965aea7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b6ba5d(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm index d0063b9..f93a99a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,46 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b6ba5d = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_b6ba5d +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_b6ba5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_b6ba5d + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_b6ba5d + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl index 03eb225..bb45604 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_b6ba5d() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1i, 1i); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl index 23f48da..7b360ac 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: i32) -> vec4<u32> fn textureLoad_b73f6b() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl index 9d694aa..40bf70c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl index 9d694aa..40bf70c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl index b9f8285..9129c98 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl index 2515e7f..fb6414e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b73f6b(texture2d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm index 991603f..c258b1f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b73f6b = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_b73f6b +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_b73f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_b73f6b + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_b73f6b + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl index 074690f..fbfde8a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<u32>; fn textureLoad_b73f6b() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl index 6a6a232..7c1b11c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<i32>, sample_index: u32) -> vec4<f32> fn textureLoad_b75d4a() { - var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl index 1b77601..8d6034b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_b75d4a() { - float4 res = arg_0.Load((0).xx, 1u); + float4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl index 1b77601..8d6034b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_b75d4a() { - float4 res = arg_0.Load((0).xx, 1u); + float4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl index 29de15d..c73b745 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl index cb1c017..9e6c646 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b75d4a(texture2d_ms<float, access::read> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm index 56442d6..2c00abc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b75d4a = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %uint_1 + %16 = OpImageFetch %v4float %17 %21 Sample %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_b75d4a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_b75d4a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_b75d4a + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_b75d4a + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl index 9a592a6..e0ac92c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>; fn textureLoad_b75d4a() { - var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl index ae600b1..72bc65a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: i32) -> vec4<f32> fn textureLoad_bcbb3c() { - var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl index 8a88e0f..d1270b1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + float4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl index 8a88e0f..d1270b1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<float4> arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + float4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl index 008c403..12d1532 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl index c22a9b9..bb6243e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_bcbb3c(texture3d<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + float4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm index 637018c..f73237b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_bcbb3c = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_bcbb3c +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_bcbb3c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_bcbb3c + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_bcbb3c + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl index a968218..6760114 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<f32>; fn textureLoad_bcbb3c() { - var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl index 75e8289..c653ca5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: u32, level: i32) -> f32 fn textureLoad_c16e00() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl index 322a9ec..2cc06f6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - float res = arg_0.Load(int4(0, 0, int(1u), 1)).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl index 322a9ec..2cc06f6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - float res = arg_0.Load(int4(0, 0, int(1u), 1)).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl index 62fbdb9..3871cbc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl index 8159c0f..0172359 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c16e00(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm index 64906d9..a26dedc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,43 +38,46 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_c16e00 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_c16e00 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_c16e00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_c16e00 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_c16e00 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_c16e00 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_c16e00 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl index 6a7cf77..a2b063b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_c16e00() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1u, 1i); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl index 5b373ac..a112e75 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: i32) -> vec4<i32> fn textureLoad_c2a480() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl index 4d4bde4..12025bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_c2a480() { - int4 res = arg_0.Load(int3(0, 0, 1)); + int4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl index 4d4bde4..12025bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_c2a480() { - int4 res = arg_0.Load(int3(0, 0, 1)); + int4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl index 3e70878..cb7e8df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl index 0088df6..ca4ac4e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c2a480(texture2d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm index 36ee782..c5f9924 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %int_1 + %17 = OpImageFetch %v4int %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl index 3f1aefe..3e94689 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<i32>; fn textureLoad_c2a480() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl index 618ca49..a1cc531 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<i32>, sample_index: i32) -> vec4<u32> fn textureLoad_c378ee() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl index fc7d1b6..1d70b91 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_c378ee() { - uint4 res = arg_0.Load((0).xx, 1); + uint4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl index fc7d1b6..1d70b91 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_c378ee() { - uint4 res = arg_0.Load((0).xx, 1); + uint4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl index cdb2ca0..7578fc0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl index efdc2c2..5d9e980 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c378ee(texture2d_ms<uint, access::read> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm index 7190f78..67eaa27 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm
@@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Sample %int_1 + %17 = OpImageFetch %v4uint %19 %23 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl index 2f84fbc..3a19878 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>; fn textureLoad_c378ee() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl index 25ac317..21d4579 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<i32>, sample_index: u32) -> vec4<u32> fn textureLoad_cad5f2() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl index 0f93cc8..35323e9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_cad5f2() { - uint4 res = arg_0.Load((0).xx, 1u); + uint4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl index 0f93cc8..35323e9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_cad5f2() { - uint4 res = arg_0.Load((0).xx, 1u); + uint4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl index 9e82ddf..212df3b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl index 8cc1c1b..d2d03a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cad5f2(texture2d_ms<uint, access::read> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm index 7097846..770f50b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cad5f2 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Sample %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_cad5f2 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_cad5f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_cad5f2 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_cad5f2 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl index 1420f61..c1ff4e1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>; fn textureLoad_cad5f2() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl index 89a146b..b2a49a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<u32>, array_index: u32, level: i32) -> f32 fn textureLoad_cb57c2() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl index 79442d0..17a6eb8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - float res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl index 79442d0..17a6eb8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - float res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl index f71215d..1b6e405 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl index 893d800..9b10a8a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cb57c2(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm index 68a2176..aabd47f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.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 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cb57c2 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4float %18 %26 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_cb57c2 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_cb57c2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_cb57c2 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_cb57c2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_cb57c2 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_cb57c2 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl index 3cd1cd3..8aa33ed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_cb57c2() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl index 68abe1f..785f37c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: u32) -> vec4<i32> fn textureLoad_e35f72() { - var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl index de8d7fe..314a8cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_e35f72() { - int4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + int4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl index de8d7fe..314a8cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture3D<int4> arg_0 : register(t0, space1); void textureLoad_e35f72() { - int4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + int4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl index 0117c1a..c76b195 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl index d26d358..8d90d9d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e35f72(texture3d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + int4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm index 69920c5..d2e44af 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_e35f72 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_e35f72 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_e35f72 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_e35f72 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_e35f72 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl index 2e8197d..9f98211 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d<i32>; fn textureLoad_e35f72() { - var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl index 1869efe..5f75cfc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<i32>, coords: vec2<i32>, sample_index: i32) -> vec4<i32> fn textureLoad_e3d2cc() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl index 6d097d4..e6d2e54 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int4 res = arg_0.Load((0).xx, 1); + int4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl index 6d097d4..e6d2e54 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<int4> arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int4 res = arg_0.Load((0).xx, 1); + int4 res = arg_0.Load((1).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl index 7dc1ade..0a3f39b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl index 024057e..219ced8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e3d2cc(texture2d_ms<int, access::read> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm index 87d98ce..b675216 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm
@@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Sample %int_1 + %17 = OpImageFetch %v4int %19 %22 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl index d41a2bb..bcca84f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>; fn textureLoad_e3d2cc() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1i); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl index 4ee85a0..a148c96 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: u32) -> vec4<u32> fn textureLoad_ebfb92() { - var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl index ef22fda..b5068f8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_ebfb92() { - uint4 res = arg_0.Load(int3(0, 0, int(1u))); + uint4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl index ef22fda..b5068f8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<uint4> arg_0 : register(t0, space1); void textureLoad_ebfb92() { - uint4 res = arg_0.Load(int3(0, 0, int(1u))); + uint4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl index 6176e8d..3304740 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl index 1310118..150e05f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ebfb92(texture2d<uint, access::sample> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm index 4e03907..2d2b7c1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ebfb92 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_ebfb92 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_ebfb92 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_ebfb92 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_ebfb92 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl index c2dd172..ba62a2d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<u32>; fn textureLoad_ebfb92() { - var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl index 96f2bca..c40b098 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<f32>, coords: vec2<u32>, sample_index: i32) -> vec4<f32> fn textureLoad_f0abad() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl index 0612336..87dd503 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_f0abad() { - float4 res = arg_0.Load((0u).xx, 1); + float4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl index 0612336..87dd503 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_f0abad() { - float4 res = arg_0.Load((0u).xx, 1); + float4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl index d5d441c..e3f38e3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl index 75cdfbf..cb62355 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f0abad(texture2d_ms<float, access::read> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm index e60070d..2ee3f4d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.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 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f0abad = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %int_1 + %16 = OpImageFetch %v4float %17 %21 Sample %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_f0abad +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_f0abad OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_f0abad + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_f0abad + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl index f422c02..39a6743 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>; fn textureLoad_f0abad() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl index 105dab7..8ded634 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<u32>, array_index: u32, level: i32) -> vec4<f32> fn textureLoad_f348d9() { - var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl index cc20744..3ed4094 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_f348d9() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl index cc20744..3ed4094 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray<float4> arg_0 : register(t0, space1); void textureLoad_f348d9() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl index 9302278..8ee158a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl index 65f4407..fc4b059 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f348d9(texture2d_array<float, access::sample> tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm index 0c617c7..dda8c12 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,44 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f348d9 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %int_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + %16 = OpImageFetch %v4float %17 %25 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_f348d9 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_f348d9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_f348d9 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_f348d9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_f348d9 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_f348d9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl index 7b599f1..e36ca47 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array<f32>; fn textureLoad_f348d9() { - var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(), 1u, 1i); + var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl index fcd1f60..deaef28 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: u32) -> vec4<i32> fn textureLoad_f85291() { - var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl index 2f163b0..f506fc9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_f85291() { - int4 res = arg_0.Load(int3(0, 0, int(1u))); + int4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl index 2f163b0..f506fc9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2D<int4> arg_0 : register(t0, space1); void textureLoad_f85291() { - int4 res = arg_0.Load(int3(0, 0, int(1u))); + int4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl index 8051539..7aaf2b6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl index 5c0fefd..4a0ede2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f85291(texture2d<int, access::sample> tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm index 00b2ab5..72f452b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f85291 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_f85291 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_f85291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_f85291 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_f85291 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl index 56f3c1b..7fcdc5b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d<i32>; fn textureLoad_f85291() { - var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1u); + var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl index b8e63aa..8e6c0ac 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2<u32>, sample_index: i32) -> f32 fn textureLoad_fcd23d() { - var res: f32 = textureLoad(arg_0, vec2<u32>(), 1i); + var res: f32 = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl index 8ca9a66..c684738 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_fcd23d() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl index 8ca9a66..c684738 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<float4> arg_0 : register(t0, space1); void textureLoad_fcd23d() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl index 87e28c88..d812b0d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl index 159dd8d..db62b99 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fcd23d(depth2d_ms<float, access::read> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm index c504a4e..57fb66f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.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 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fcd23d = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %int_1 + %17 = OpImageFetch %v4float %18 %22 Sample %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_fcd23d +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_fcd23d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_fcd23d + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_fcd23d + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl index 8c90ff7..bb55cae 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_fcd23d() { - var res : f32 = textureLoad(arg_0, vec2<u32>(), 1i); + var res : f32 = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl index a85f8c2..0d15c85 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d<u32>, coords: vec2<u32>, sample_index: i32) -> vec4<u32> fn textureLoad_fe0565() { - var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl index d4b0633..85598d6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint4 res = arg_0.Load((0u).xx, 1); + uint4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl index d4b0633..85598d6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DMS<uint4> arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint4 res = arg_0.Load((0u).xx, 1); + uint4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl index 5447511..a805a77 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl index 7e87a5c..ab16eeb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fe0565(texture2d_ms<uint, access::read> tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm index 9a345fb..4ba192b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fe0565 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Sample %int_1 + %17 = OpImageFetch %v4uint %19 %22 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_fe0565 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_fe0565 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_fe0565 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_fe0565 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl index 6aba3a6..1fc5a55 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>; fn textureLoad_fe0565() { - var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(), 1i); + var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl index 4c5826b..13bdf40 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl
@@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: u32) -> f32 fn textureLoad_ff1119() { - var res: f32 = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res: f32 = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl index 4b0e14e..9563888 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - float res = arg_0.Load(int4(0, 0, 1, int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, 1), int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl index 4b0e14e..9563888 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - float res = arg_0.Load(int4(0, 0, 1, int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, 1), int(1u))).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl index 3a05870..7a186c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl
@@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl index f136a44..e8df23c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ff1119(depth2d_array<float, access::sample> tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm index faa0652..c95bc7e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.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 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ff1119 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4float %18 %26 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_ff1119 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_ff1119 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_ff1119 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_ff1119 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_ff1119 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_ff1119 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl index de0e81a..54b519f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_ff1119() { - var res : f32 = textureLoad(arg_0, vec2<i32>(), 1i, 1u); + var res : f32 = textureLoad(arg_0, vec2<i32>(1i), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl index 99f28fb..a85b019 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32 fn textureSample_0dff6c() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f), vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl index 5e03f88..b1bd4db 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl index 5e03f88..b1bd4db 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl index f090792..569c11d 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSample_0dff6c() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), ivec2(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl index ea808ae..921da0e 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_0dff6c(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), int2(1)); } fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm index e555843..f904425 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,27 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %23 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %28 = OpConstantNull %float %textureSample_0dff6c = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %28 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 ConstOffset %23 + %13 = OpImageSampleImplicitLod %v4float %18 %21 ConstOffset %25 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_0dff6c + %30 = OpLabel + %31 = OpFunctionCall %void %textureSample_0dff6c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl index 5dff612..077f24e 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_0dff6c() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f), vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl index 75d604c..270ed3c 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> vec4<f32> fn textureSample_17e988() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl index fc8a980..0d08b8a 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl index fc8a980..0d08b8a 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl index fdfe3c00..e7e4671 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSample_17e988() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl index 167ac7b..a0488ff 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_17e988(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, int2(1)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm index 576ac75..577289c 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,27 +28,31 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %25 = OpConstantNull %v2int + %29 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpConstantNull %v4float + %32 = OpConstantNull %v4float %textureSample_17e988 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %28 + %res = OpVariable %_ptr_Function_v4float Function %32 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %25 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 ConstOffset %29 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSample_17e988 + %34 = OpLabel + %35 = OpFunctionCall %void %textureSample_17e988 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl index d65f739..4f40854 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_17e988() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl index da6cdf5..7e6f166 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> vec4<f32> fn textureSample_193203() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl index 187167c..6c65bd9 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl index 187167c..6c65bd9 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl index ef540d8..d937f89 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSample_193203() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl index c558b32..94f0b02 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, int2(1)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm index 8804d99..23ed9ec 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,33 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %29 = OpConstantNull %v4float + %34 = OpConstantNull %v4float %textureSample_193203 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %29 + %res = OpVariable %_ptr_Function_v4float Function %34 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %26 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 ConstOffset %31 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSample_193203 + %36 = OpLabel + %37 = OpFunctionCall %void %textureSample_193203 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl index 3413bbc..1338058 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_193203() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl index 852f2bd..ecd6c55 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32) -> f32 fn textureSample_1a4e1b() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl index 4c9c23a..48c3a12 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl index 4c9c23a..48c3a12 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl index 492bbc0..eb3bbf5 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_1a4e1b() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 0.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl index efc575c..f128704 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_1a4e1b(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm index 2da95e8..bfb607d 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,30 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %27 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_1a4e1b = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %27 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertUToF %float %uint_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSample_1a4e1b + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_1a4e1b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl index 7bc414e..ddcf5c1 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_1a4e1b() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl index ccab6e5..28cf0ec 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> fn textureSample_2149ec() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), vec3<i32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.f), vec3<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl index 137a2ff..3d19892 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx, (0).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx, (1).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl index 137a2ff..3d19892 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx, (0).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx, (1).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl index 2592c4f..f84b20c 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSample_2149ec() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f), ivec3(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(1.0f), ivec3(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl index b6ec309..8a65f3f 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_2149ec(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), int3(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), int3(1)); } fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm index 21ae9c0..a239621 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,24 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_2149ec = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 ConstOffset %22 + %12 = OpImageSampleImplicitLod %v4float %17 %20 ConstOffset %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_2149ec + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_2149ec OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl index 0b47e89..35374f7 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_2149ec() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), vec3<i32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.0f), vec3<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl index 373481c..051eaf5 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32 fn textureSample_38bbb9() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>()); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl index aeb2754..e03d4c2 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float res = arg_0.Sample(arg_1, (0.0f).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl index aeb2754..e03d4c2 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float res = arg_0.Sample(arg_1, (0.0f).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl index b2554c9..416111a 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSample_38bbb9() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 0.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl index 7884b31..cf5b10f 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_38bbb9(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f)); } fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm index 788cf86..dea5bc7 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,22 +28,23 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float - %23 = OpConstantNull %float + %24 = OpConstantNull %float %textureSample_38bbb9 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %23 + %res = OpVariable %_ptr_Function_float Function %24 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 + %13 = OpImageSampleImplicitLod %v4float %18 %21 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %25 = OpLabel - %26 = OpFunctionCall %void %textureSample_38bbb9 + %26 = OpLabel + %27 = OpFunctionCall %void %textureSample_38bbb9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl index 6edb215..5289739 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_38bbb9() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>()); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl index bbfc116..788c36c 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> fn textureSample_3b50bd() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl index 7b99e2a..e0704fc 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl index 7b99e2a..e0704fc 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl index 8d1d18d..dee9372 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSample_3b50bd() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f)); + vec4 res = texture(arg_0_arg_1, vec3(1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl index a63d38d..a468d12 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_3b50bd(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm index c41cc4d..688f51c 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_3b50bd = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_3b50bd + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_3b50bd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl index 43bc582..8c8a881 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_3b50bd() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.0f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl index 3e7b95d..9ba4e8b 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32 fn textureSample_4703d0() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl index 6d8b7dd..fc84a42 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl index 6d8b7dd..fc84a42 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl index e412a9c..4fb976b 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, int2(1)); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm index 178481b..e0a5ff8 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,29 +28,34 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %27 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %30 = OpConstantNull %float + %35 = OpConstantNull %float %textureSample_4703d0 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %30 + %res = OpVariable %_ptr_Function_float Function %35 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertUToF %float %uint_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %27 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 ConstOffset %32 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSample_4703d0 + %37 = OpLabel + %38 = OpFunctionCall %void %textureSample_4703d0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl index 0ee6598..26fc828 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4703d0() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl index 2bb8379..a7caecb 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32> fn textureSample_4dd1bf() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1i); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl index 47013d2..29b4291 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl index 47013d2..29b4291 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl index f392da9..c6fdd3b 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_4dd1bf(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1); } fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm index d67b63c..5a24085 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,25 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_4dd1bf = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_4dd1bf + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_4dd1bf OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl index cdeb313..8c22933 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4dd1bf() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1i); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.0f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl index e3eed03..c896790 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureSample_51b514() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl index 68aa5c7..f2a4363 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl index 68aa5c7..f2a4363 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl index b04d681..f342935 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSample_51b514() { - vec4 res = texture(arg_0_arg_1, vec2(0.0f)); + vec4 res = texture(arg_0_arg_1, vec2(1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl index a8e99fb..fc21a11 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_51b514(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f)); } fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm index a7f4db5b..c60d0d9 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_51b514 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_51b514 + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_51b514 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl index 7a5e264..f2c44d4 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_51b514() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl index b6c5824..c7b3649 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> f32 fn textureSample_60bf45() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl index 0575d77..cd9ed54 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl index 0575d77..cd9ed54 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl index 20593ce..a1c4154 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_60bf45(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, int2(1)); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm index 966d12d..07330a4 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,32 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpConstantNull %float + %33 = OpConstantNull %float %textureSample_60bf45 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %29 + %res = OpVariable %_ptr_Function_float Function %33 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertSToF %float %int_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %26 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 ConstOffset %30 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSample_60bf45 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSample_60bf45 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl index 1f8b519..1ad211e 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_60bf45() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl index a4919ef..d0f47d7 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> fn textureSample_6717ca() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1i); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl index 7b1e6e4..7bb8465 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl index 7b1e6e4..7bb8465 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl index 2698d8d..2a02847 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSample_6717ca() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1))); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl index aa18356..4d43b99 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_6717ca(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm index 9a6f969..791030f 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_6717ca = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_6717ca + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_6717ca OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl index 76ba9f7..294089d 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_6717ca() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1i); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl index f774b5e..e59e22d 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32) -> f32 fn textureSample_7e9ffd() { - var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1i); + var res: f32 = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl index b316713..ca968eb 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl index b316713..ca968eb 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl index 08b4dee..71f476b 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_7e9ffd() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 0.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl index 7ed4a39..0c46324 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_7e9ffd(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm index 313d27d..78b2484 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,30 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %27 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_7e9ffd = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %27 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertSToF %float %int_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSample_7e9ffd + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_7e9ffd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl index 1332fda..7b6b971 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7e9ffd() { - var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(), 1i); + var res : f32 = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl index f9375b6..e6e7dac 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32) -> f32 fn textureSample_7fd8cb() { - var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u); + var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(1.f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl index b5845ec..72ac331 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl index b5845ec..72ac331 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl index d3e7dae..b4a8598 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_7fd8cb(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u); } fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm index bf1bc8b..dd12402 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,31 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_7fd8cb = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20 - %13 = OpImageSampleImplicitLod %v4float %18 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpCompositeExtract %float %21 2 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v4float %22 %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_7fd8cb + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_7fd8cb OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl index 113fb82..efb9aa8 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7fd8cb() { - var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1u); + var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(1.0f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl index da9893c..62b34f6 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureSample_85c4ba() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f), vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl index f43541c..7805be0 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl index f43541c..7805be0 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl index 9c7c7b3..d2c3fdf 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSample_85c4ba() { - vec4 res = textureOffset(arg_0_arg_1, vec2(0.0f), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec2(1.0f), ivec2(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl index 50844e3..8166410 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_85c4ba(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), int2(1)); } fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm index 17a25fc..c10c796 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,24 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_85c4ba = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 ConstOffset %22 + %12 = OpImageSampleImplicitLod %v4float %17 %20 ConstOffset %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_85c4ba + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_85c4ba OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl index 8d23c15..aadd3ad 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_85c4ba() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f), vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl index b1003d5..44f9a7f 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32> fn textureSample_bc7477() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl index 9a8aa64..77241f8 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl index 9a8aa64..77241f8 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl index e106ef0..8391338 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_bc7477(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u); } fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm index 5c437e0..f4bea58 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,25 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_bc7477 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_bc7477 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_bc7477 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl index ed1eaf5..9dcbcfa 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_bc7477() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(), 1u); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.0f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl index 94a4b8c..f694b6d 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32) -> f32 fn textureSample_c2f4e8() { - var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1i); + var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(1.f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl index c2eee5a..26b5e6f 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl index c2eee5a..26b5e6f 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl index 812a3e0..27a85f2 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_c2f4e8(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1); } fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm index 8c5f546..fde2213 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,31 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_c2f4e8 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20 - %13 = OpImageSampleImplicitLod %v4float %18 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpCompositeExtract %float %21 2 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v4float %22 %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_c2f4e8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_c2f4e8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl index 30b8049..9d26633 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_c2f4e8() { - var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(), 1i); + var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(1.0f), 1i); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl index a73972e..7aeff75 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32> fn textureSample_d6b281() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl index aea0117..969ed3d 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl index aea0117..969ed3d 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl index b375b29..e2d3e57 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSample_d6b281() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u))); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u))); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl index 0819cfe..8f6e17e 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_d6b281(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm index f8028706..89da249 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_d6b281 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_d6b281 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_d6b281 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl index 63495a9..351d73e 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_d6b281() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(), 1u); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec2<f32>(1.0f), 1u); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl index 35b2e9e..e0e2213 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> fn textureSample_e53267() { - var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>()); + var res: vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl index 18cffd4..7c72e8a 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl index 18cffd4..7c72e8a 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl index 8abd834..bab2834 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSample_e53267() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f)); + vec4 res = texture(arg_0_arg_1, vec3(1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl index 6953ad2..273271f 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_e53267(texturecube<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm index 814f3b6..faaae35 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_e53267 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_e53267 + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_e53267 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl index d4d1c10..4ed3277 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_e53267() { - var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>()); + var res : vec4<f32> = textureSample(arg_0, arg_1, vec3<f32>(1.0f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl index d35b7a4..9187195 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl
@@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 fn textureSample_ea7030() { - var res: f32 = textureSample(arg_0, arg_1, vec3<f32>()); + var res: f32 = textureSample(arg_0, arg_1, vec3<f32>(1.f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl index 4f82f08..efcac93 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float res = arg_0.Sample(arg_1, (0.0f).xxx).x; + float res = arg_0.Sample(arg_1, (1.0f).xxx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl index 4f82f08..efcac93 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float res = arg_0.Sample(arg_1, (0.0f).xxx).x; + float res = arg_0.Sample(arg_1, (1.0f).xxx).x; } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl index 3803280..8fbca7b 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSample_ea7030() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 0.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl index 295b3ac..c5cfd80 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSample_ea7030(depthcube<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm index d3c3a4ea..03c157a 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,22 +28,23 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float - %23 = OpConstantNull %float + %24 = OpConstantNull %float %textureSample_ea7030 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %23 + %res = OpVariable %_ptr_Function_float Function %24 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 + %13 = OpImageSampleImplicitLod %v4float %18 %21 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %25 = OpLabel - %26 = OpFunctionCall %void %textureSample_ea7030 + %26 = OpLabel + %27 = OpFunctionCall %void %textureSample_ea7030 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl index de2934b..5d10efe 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_ea7030() { - var res : f32 = textureSample(arg_0, arg_1, vec3<f32>()); + var res : f32 = textureSample(arg_0, arg_1, vec3<f32>(1.0f)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl index 55110ea..080a6be 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureSampleBaseClampToEdge_7c04e6() { - var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl index 2dbd2e8..6bfa0cb 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
@@ -91,7 +91,7 @@ } void textureSampleBaseClampToEdge_7c04e6() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl index 2dbd2e8..6bfa0cb 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
@@ -91,7 +91,7 @@ } void textureSampleBaseClampToEdge_7c04e6() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl index 8bc33df..82b6a82 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
@@ -58,7 +58,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } vec4 vertex_main() { @@ -135,7 +135,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void fragment_main() { @@ -206,7 +206,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl index 70af2f8..146503a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl
@@ -64,7 +64,7 @@ } void textureSampleBaseClampToEdge_7c04e6(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(0.0f), *(tint_symbol_4)); + float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(1.0f), *(tint_symbol_4)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm index 9490a32..1597eb3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 164 +; Bound: 165 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -127,10 +127,11 @@ %119 = OpConstantNull %uint %void = OpTypeVoid %137 = OpTypeFunction %void + %145 = OpConstantComposite %v2float %float_1 %float_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %151 = OpTypeFunction %v4float + %152 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %25 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -246,31 +247,31 @@ %142 = OpLoad %11 %arg_0 %143 = OpLoad %11 %ext_tex_plane_1 %144 = OpLoad %24 %arg_1 - %147 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %148 = OpLoad %ExternalTextureParams %147 - %141 = OpFunctionCall %v4float %textureSampleExternal %142 %143 %144 %87 %148 + %148 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %149 = OpLoad %ExternalTextureParams %148 + %141 = OpFunctionCall %v4float %textureSampleExternal %142 %143 %144 %145 %149 OpStore %res %141 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %151 - %153 = OpLabel - %154 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 +%vertex_main_inner = OpFunction %v4float None %152 + %154 = OpLabel + %155 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %137 - %156 = OpLabel - %157 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %157 + %157 = OpLabel + %158 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %158 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %137 - %159 = OpLabel - %160 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %160 = OpLabel + %161 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %137 - %162 = OpLabel - %163 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %163 = OpLabel + %164 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl index f24b223..dcebcd2 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_7c04e6() { - var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>()); + var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl index 2952fdc..e5e598c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureSampleBaseClampToEdge_9ca02c() { - var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl index 2799157..c868b5e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl
@@ -11,7 +11,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (0.0f).xx); + float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl index 2799157..c868b5e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl
@@ -11,7 +11,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (0.0f).xx); + float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl index baa94b2..2d912aa 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
@@ -11,7 +11,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } vec4 vertex_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } void fragment_main() { @@ -65,7 +65,7 @@ uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl index 221a88d..f1d03f2 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl
@@ -9,7 +9,7 @@ } void textureSampleBaseClampToEdge_9ca02c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, float2(0.0f)); + float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, float2(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm index 154fae2..cb680b0 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -60,8 +60,9 @@ %40 = OpTypeSampledImage %11 %void = OpTypeVoid %42 = OpTypeFunction %void + %49 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %51 = OpTypeFunction %v4float + %52 = OpTypeFunction %v4float %tint_textureSampleBaseClampToEdge = OpFunction %v4float None %15 %t = OpFunctionParameter %11 %s = OpFunctionParameter %14 @@ -83,29 +84,29 @@ %res = OpVariable %_ptr_Function_v4float Function %5 %47 = OpLoad %11 %arg_0 %48 = OpLoad %14 %arg_1 - %46 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %47 %48 %37 + %46 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %47 %48 %49 OpStore %res %46 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %51 - %53 = OpLabel - %54 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %42 - %56 = OpLabel - %57 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %57 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %42 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %42 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl index 4d1b105..9ec6ff6 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_9ca02c() { - var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>()); + var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl index f76a6b2..1272f7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32) -> vec4<f32> fn textureSampleBias_1c707e() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl index f0c0f28..07f6325 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl index f0c0f28..07f6325 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl index 6463438..84e14fe 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_1c707e() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl index 606c7f3..39249ba 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_1c707e(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, bias(1.0f)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm index c809e51..fea1a4d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_1c707e = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %27 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleBias_1c707e + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_1c707e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl index a738d9c..b8d2d75 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_1c707e() { - var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl index 5300171..8c734db 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> fn textureSampleBias_53b9f7() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl index ec467db..4c8919f 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl index ec467db..4c8919f 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl index c40abb6..ee550b4 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleBias_53b9f7() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl index dde5bfe..294cda1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_53b9f7(texturecube<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f)); } fragment void fragment_main(texturecube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm index ff35323..e36e921 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm
@@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_53b9f7 = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd
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 d4680e6..6add8f8 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<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl index 32eafc4..c78555e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32> fn textureSampleBias_594824() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.f, vec3<i32>()); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.f), 1.f, vec3<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl index 8ebc001..0ca62fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl index 8ebc001..0ca62fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl index e524a8d..a13ea63 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleBias_594824() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f), ivec3(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(1.0f), ivec3(1), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl index 193009e..a7214cb 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_594824(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f), int3(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f), int3(1)); } fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm index 4cc39b2..700df82 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.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 @@ -28,25 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %23 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSampleBias_594824 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias|ConstOffset %float_1 %23 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias|ConstOffset %float_1 %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_594824 + %29 = OpLabel + %30 = OpFunctionCall %void %textureSampleBias_594824 OpReturn OpFunctionEnd
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 3fe9740..6a60558 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<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0f, vec3<i32>()); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.0f), 1.0f, vec3<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl index b47bcdf..bba474e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32) -> vec4<f32> fn textureSampleBias_6a9113() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl index a3e3379..4949956 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl index a3e3379..4949956 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl index ca84e9d..7190a88 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleBias_6a9113() { - vec4 res = texture(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl index ac41f09..c3b8284 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_6a9113(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), bias(1.0f)); } fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm index eb73824..44afc2e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm
@@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_6a9113 = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd
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 f864438..7145dea 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<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl index 20389f5..e7aae06 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32) -> vec4<f32> fn textureSampleBias_80e579() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1i, 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl index 5e8a9d2..acd8d6c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl index 5e8a9d2..acd8d6c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl index 0b9130c..27da1a2 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_80e579() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl index 0a6cba8..075eb4f 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_80e579(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, bias(1.0f)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm index 9907f75..0e5ab6c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_80e579 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %27 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleBias_80e579 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_80e579 OpReturn OpFunctionEnd
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 2d96438..0bb6820 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<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl index dc6ef1e..9c0fac2 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, bias: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleBias_87915c() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl index d6e02c4..2f3e802 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl index d6e02c4..2f3e802 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl index 27f3db1..a9d8bb7 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_87915c() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl index 0d11b74..ce4bb4e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, bias(1.0f), int2(1)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm index fc3f131..aa716b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,29 +28,33 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %27 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpConstantNull %v4float + %34 = OpConstantNull %v4float %textureSampleBias_87915c = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %30 + %res = OpVariable %_ptr_Function_v4float Function %34 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %27 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias|ConstOffset %float_1 %31 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleBias_87915c + %36 = OpLabel + %37 = OpFunctionCall %void %textureSampleBias_87915c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl index ff707a3..d8a4075 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_87915c() { - var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl index 45cb35f..f238a26 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, bias: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleBias_9dbb51() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1i, 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl index bc8a5cd..19f1088 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl index bc8a5cd..19f1088 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl index 9f316ab..e66d254 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_9dbb51() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl index 9958fb1..0ef2fee 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_9dbb51(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, bias(1.0f), int2(1)); } fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm index f7bcac5..eb7f586 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,31 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %29 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %29 = OpConstantNull %v4float + %32 = OpConstantNull %v4float %textureSampleBias_9dbb51 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %29 + %res = OpVariable %_ptr_Function_v4float Function %32 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %26 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias|ConstOffset %float_1 %29 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSampleBias_9dbb51 + %34 = OpLabel + %35 = OpFunctionCall %void %textureSampleBias_9dbb51 OpReturn OpFunctionEnd
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 24794c9..7107527 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<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1i, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl index e236889..53df7a0 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleBias_a161cf() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.f), 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl index 3d63e8a..4945bcf 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl index 3d63e8a..4945bcf 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl index e819fcd..d87948b 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleBias_a161cf() { - vec4 res = textureOffset(arg_0_arg_1, vec2(0.0f), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec2(1.0f), ivec2(1), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl index 87dac44..c19ac1d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_a161cf(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), bias(1.0f), int2(1)); } fragment void fragment_main(texture2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm index 6b14f26..9ef90ee 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.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 @@ -28,25 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %23 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSampleBias_a161cf = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias|ConstOffset %float_1 %23 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias|ConstOffset %float_1 %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_a161cf + %29 = OpLabel + %30 = OpFunctionCall %void %textureSampleBias_a161cf OpReturn OpFunctionEnd
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 a9dd4dd..5e297e0 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<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(), 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec2<f32>(1.0f), 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl index 2104892..76bd6e3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, bias: f32) -> vec4<f32> fn textureSampleBias_c6953d() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.f), 1u, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl index ed2fe60..5910685 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl index ed2fe60..5910685 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl index a116ed6..1b2d131 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_c6953d(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u, bias(1.0f)); } fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm index 9e266d7..a397331 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_c6953d = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_c6953d + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_c6953d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl index 3309656..05036e8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_c6953d() { - var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl index 9fc2800..69b7a6cd 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32) -> vec4<f32> fn textureSampleBias_d3fa1b() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl index cfb6394..4a3c173 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl index cfb6394..4a3c173 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl index ae1ce59..0070577 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleBias_d3fa1b() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl index 07cd37c..abb2266 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_d3fa1b(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f)); } fragment void fragment_main(texture3d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm index 563bd63..f784b80 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm
@@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_d3fa1b = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd
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 88a0885..4b2a5ef 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<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl index 59b8491..8ce34f3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, bias: f32) -> vec4<f32> fn textureSampleBias_eed7c4() { - var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1i, 1.f); + var res: vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.f), 1i, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl index c9c75d9..c7a3c0e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl index c9c75d9..c7a3c0e 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl index de4a663..f85bedb 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_eed7c4(texturecube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1, bias(1.0f)); } fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm index ade6cb9..dd2157d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_eed7c4 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_eed7c4 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_eed7c4 OpReturn OpFunctionEnd
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 f1f2c2e..7a4b852 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<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureSampleBias(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl index 5bf28c5..7fdb1a2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_1912e5() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.f), 1u, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl index 1547bd9..7a92361 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl index 1547bd9..7a92361 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl index 13fdf12..081841e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_1912e5(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1u, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1u, 1.0f); } fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm index c678e74..c25195f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %30 = OpConstantNull %float %textureSampleCompare_1912e5 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %30 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleDrefImplicitLod %float %16 %27 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_1912e5 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleCompare_1912e5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl index 8f16f24..fe92032 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_1912e5() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1u, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl index 891c420..164f501 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl index 948b7a7..0b84d35 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl index 948b7a7..0b84d35 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl index 7210133..572b81d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_3a5923() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl index 6b5e76d..c2f18a0 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_3a5923(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1.0f); } fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm index a3d0519..3e1d3fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm
@@ -27,8 +27,8 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %18 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float %22 = OpConstantNull %float %textureSampleCompare_3a5923 = OpFunction %void None %8 @@ -37,7 +37,7 @@ %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 OpStore %res %12 OpReturn OpFunctionEnd
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 58dbd58..f25220e 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<f32>(), 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl index c73015c..8f8b48f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl index 33b00bc..1b2f46c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl index 33b00bc..1b2f46c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl index 43a8eaa..c44279d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompare_63fb83() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl index bdcf85c..675ddff 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_63fb83(depthcube<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1.0f); } fragment void fragment_main(depthcube<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm index 3f2a1bf..a787c1e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm
@@ -27,8 +27,8 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %18 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float %22 = OpConstantNull %float %textureSampleCompare_63fb83 = OpFunction %void None %8 @@ -37,7 +37,7 @@ %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 OpStore %res %12 OpReturn OpFunctionEnd
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 0012b5f..23417db 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<f32>(), 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl index 58da027..63d0902 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompare_7b5025() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl index fa4f65a..c30bf79 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl index fa4f65a..c30bf79 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl index eb74d38..b382b24 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1u, 1.0f, int2(1)); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm index 5baaf3c..7e777640 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,29 +27,33 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpConstantNull %float + %33 = OpConstantNull %float %textureSampleCompare_7b5025 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %29 + %res = OpVariable %_ptr_Function_float Function %33 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %26 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertUToF %float %uint_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 ConstOffset %30 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSampleCompare_7b5025 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleCompare_7b5025 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl index 602982c..c2ed132 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_7b5025() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl index 7483dd5..0a09974 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_90ae56() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl index 7e358fb..25b14da 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl index 7e358fb..25b14da 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl index abfc412..3b40ea3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_90ae56() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl index 00080f4..2722e0f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_90ae56(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1u, 1.0f); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm index 89b9887..ddc3391 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,26 +27,29 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %29 = OpConstantNull %float %textureSampleCompare_90ae56 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %29 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertUToF %float %uint_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_90ae56 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleCompare_90ae56 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl index 8559700..47b307a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_90ae56() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1u, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl index 68d1f2f..aabaf7a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_a3ca7e() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(), 1i, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.f), 1i, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl index 0eaad4f..065ae8e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl index 0eaad4f..065ae8e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl index 46e23e1..45b7d6d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_a3ca7e(depthcube_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1, 1.0f); } fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm index e1df692..d61275f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %30 = OpConstantNull %float %textureSampleCompare_a3ca7e = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %30 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleDrefImplicitLod %float %16 %27 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_a3ca7e + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleCompare_a3ca7e OpReturn OpFunctionEnd
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 1c935d2..58499f5 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<f32>(), 1i, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl index 329e2f9..3edb3b0 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompare_af1051() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.f, vec2<i32>()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl index 60ff095..40bf84a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl index 60ff095..40bf84a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl index beb2117..d1a9096 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_af1051(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1, 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1, 1.0f, int2(1)); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm index 4e66ca9..168e219 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,28 +27,31 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %25 = OpConstantNull %v2int + %28 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpConstantNull %float + %31 = OpConstantNull %float %textureSampleCompare_af1051 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %28 + %res = OpVariable %_ptr_Function_float Function %31 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %25 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertSToF %float %int_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 ConstOffset %28 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleCompare_af1051 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSampleCompare_af1051 OpReturn OpFunctionEnd
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 772f21e..c4cb087 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<f32>(), 1i, 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl index ea5645b..548b875 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_dd431d() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1i, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl index 0c8a7fb..56a5b3f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl index 0c8a7fb..56a5b3f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl index db905e8..b3fa410 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_dd431d() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl index 50d2af1..d265725 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_dd431d(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1, 1.0f); } fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm index f14e8bd..31d965f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,26 +27,29 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %29 = OpConstantNull %float %textureSampleCompare_dd431d = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %29 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertSToF %float %int_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_dd431d + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleCompare_dd431d OpReturn OpFunctionEnd
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 1a8cfcb..e3f8030 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<f32>(), 1i, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl index 74168e1..83b1e26 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompare_dec064() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(), 1.f, vec2<i32>()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.f), 1.f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl index 04d1915..4db9f52 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl index 04d1915..4db9f52 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl index 04d0da8..f1d1987 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl
@@ -4,7 +4,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_dec064() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void fragment_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl index 87c9f9b..1714b59 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_dec064(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1.0f, int2(1)); } fragment void fragment_main(depth2d<float, access::sample> tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm index 574e9c1..1d736d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 30 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,25 +27,26 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %18 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %25 = OpConstantNull %float + %26 = OpConstantNull %float %textureSampleCompare_dec064 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %26 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 ConstOffset %22 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 ConstOffset %23 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSampleCompare_dec064 + %28 = OpLabel + %29 = OpFunctionCall %void %textureSampleCompare_dec064 OpReturn OpFunctionEnd
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 35620f4..5cee689 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<f32>(), 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2<f32>(1.0f), 1.0f, vec2<i32>(1i)); } @fragment
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl index 7742bf3..668a270 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1116ed() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl index e84193e..23f5d43 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl index e84193e..23f5d43 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl index 573c22c..c77d7e9 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl index 822c235..b1652c7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1116ed(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm index d347914..1c01ce4 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_1116ed = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_1116ed +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd
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 bdf6717..8a1f88c 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<f32>(), 1i, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl index f3a75dd..af580e6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3<f32>, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl index 2a79a0f..bdfef71 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl index 2a79a0f..bdfef71 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl index f805d0d..2205e4d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl index 7dffcdd..ed8c9f2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1568e3(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm index d85ceba..7b336e2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float %30 = OpTypeFunction %v4float @@ -55,7 +55,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd
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 f7d7d34..30a988d 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<f32>(), 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl index a8308e3..1f52f7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl index 999c761..1bf32a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl index 999c761..1bf32a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl index 1bdaf88..4a5b1ae 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl index cc8b9a7..ec2ed1f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_2ad2b1(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm index c97b967..0a3e8b9 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float %30 = OpTypeFunction %v4float @@ -55,7 +55,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd
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 4eafbe2..e715766 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<f32>(), 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl index 75f7335..6406d08 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_4cf3a2() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1i, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl index 03160c2..5921377 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl index 03160c2..5921377 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl index 8f6c17e..eb1412b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_4cf3a2(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1, 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm index d4414e7..44e64c3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_4cf3a2 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd
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 6727920..0d98a0f 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<f32>(), 1i, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl index c27866b..3316156 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_7dc3c0() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl index 6c1d906..e0be522 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl index 6c1d906..e0be522 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl index 37e69e4..db5ecc8 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl index 3cf80ae..02aa881 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_7dc3c0(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm index a56b0ee..d144689 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl index 1e65a08..194ba59 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7dc3c0() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl index 6cc8a39..8a7f1ca 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompareLevel_7f2b9a() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1.f, vec2<i32>()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl index 772acca..b5a7b64 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl index 772acca..b5a7b64 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl index cec13f1..9cd29f9 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl index dbd5a68..35b8444 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_7f2b9a(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1.0f, level(0), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm index 98e9d47..298c239 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,44 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %textureSampleCompareLevel_7f2b9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod|ConstOffset %float_0 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod|ConstOffset %float_0 %31 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd
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 360df23..4d9f947 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<f32>(), 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl index 42d6fb2..0f80ec6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3<f32>, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_958c87() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl index 267052f..2b0a18d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl index 267052f..2b0a18d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl index a46a096..8a6ee8a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_958c87(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1u, 1.0f, level(0)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm index 6669c55..d1e88c1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_958c87 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleCompareLevel_958c87 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl index 7b6e087..b8e519d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_958c87() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl index 7b3f48b..723be9a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: i32, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompareLevel_b6e47c() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.f, vec2<i32>()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl index 536d764..77b7e86 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl index 536d764..77b7e86 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl index 44343c7..75ff04c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_b6e47c(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, level(0), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm index 4194b1a..b65a7c2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,49 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float + %39 = OpTypeFunction %v4float %textureSampleCompareLevel_b6e47c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod|ConstOffset %float_0 %36 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd
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 7214a20..887ac6a 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<f32>(), 1i, 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl index 59d04fb..36d2f40 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2<f32>, array_index: u32, depth_ref: f32, @const offset: vec2<i32>) -> f32 fn textureSampleCompareLevel_bcb3dd() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl index 25f2ddc..e0c9224 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl index 25f2ddc..e0c9224 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl index 035ddc3..4259a5c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, level(0), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm index a7672e5..73aa482 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,51 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float + %41 = OpTypeFunction %v4float %textureSampleCompareLevel_bcb3dd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod|ConstOffset %float_0 %38 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl index 41956b8..4e68be3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_bcb3dd() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl index c84adf0..9d50e04 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> fn textureSampleGrad_21402b() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.f), vec3<f32>(1.f), vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl index 6012626..31b2abe 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl index 6012626..31b2abe 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl index 4810d97..9b6b7bf 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl index e441de5..0f86e1c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_21402b(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradient3d(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradient3d(float3(1.0f), float3(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm index 99b7b95..01c9f62 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm
@@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_21402b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_21402b +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_21402b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl index d51d095..89efe6d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_21402b() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.0f), vec3<f32>(1.0f), vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl index bcb2593..b81aa6a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> fn textureSampleGrad_2ecd8f() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1i, vec2<f32>(), vec2<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<f32>(1.f), vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl index 3d01c5a..a835873 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl index 3d01c5a..a835873 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl index 93bb758..d3ab105 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl index 8b79020..2927067 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_2ecd8f(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm index ec4ab9b..0abdf22 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.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 @@ -44,45 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_2ecd8f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %27 %27 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleGrad_2ecd8f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl index aa4204f..7ca3d1f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_2ecd8f() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1i, vec2<f32>(), vec2<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<f32>(1.0f), vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl index 6b6b77c..3379bee 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> fn textureSampleGrad_521263() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), vec2<f32>(1.f), vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl index f581e30..e45601c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl index f581e30..e45601c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl index 88da1c0..2780701 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl index 902ba71..6a4297e 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_521263(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm index ac43905..6ad6311 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm
@@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_521263 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_521263 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_521263 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl index d8ade17..1deee69 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_521263() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), vec2<f32>(1.0f), vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl index 5bdc21b..1cbe125 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> fn textureSampleGrad_5312f4() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.f), vec3<f32>(1.f), vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl index 180ee4f..2839b8d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl index 180ee4f..2839b8d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl index 5f7c389..a163aeb 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl index 397cc5f..d105445 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_5312f4(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm index 19283ee..30f8d94 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm
@@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_5312f4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_5312f4 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_5312f4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl index 53ed7cc..6d19e05 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5312f4() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.0f), vec3<f32>(1.0f), vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl index 743623a..45d8aec 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32> fn textureSampleGrad_5884dd() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>(), vec3<i32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.f), vec3<f32>(1.f), vec3<f32>(1.f), vec3<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl index 56c120b..6454b45 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl index 56c120b..6454b45 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl index f5d0ae8..5be5d15 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl index 7a7fc53..024d415 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_5884dd(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradient3d(float3(0.0f), float3(0.0f)), int3(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradient3d(float3(1.0f), float3(1.0f)), int3(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm index 2ca064c..dff750a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %28 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleGrad_5884dd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad|ConstOffset %25 %25 %28 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad|ConstOffset %26 %26 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureSampleGrad_5884dd +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_5884dd + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_5884dd + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl index 8831596..67f251f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5884dd() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), vec3<f32>(), vec3<f32>(), vec3<i32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.0f), vec3<f32>(1.0f), vec3<f32>(1.0f), vec3<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl index b6d18f5..a4a5588 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleGrad_7cd6de() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<f32>(1.f), vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl index 6a9c86c..3336bc5 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl index 6a9c86c..3336bc5 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl index d56773c..82bb5d0 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl index 06c4d90..ef3b01d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm index 1513358..2db04bc 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleGrad_7cd6de = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %34 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad|ConstOffset %27 %27 %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSampleGrad_7cd6de +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_7cd6de + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleGrad_7cd6de + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl index ae06e64..aa33eef 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_7cd6de() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<f32>(1.0f), vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl index 5e9988e..f91acf5 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32> fn textureSampleGrad_a09131() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<f32>(1.f), vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl index 24569b5..42d3d4a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl index 24569b5..42d3d4a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl index 8667462..56f8737 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl index ae0a0d9..3fa0710 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm index c5bbfc2..cdd9b30 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.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 @@ -44,45 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_a09131 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %27 %27 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleGrad_a09131 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_a09131 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_a09131 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl index 212ffa8..eaec345 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_a09131() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1u, vec2<f32>(), vec2<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<f32>(1.0f), vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl index 8e3968d..a266648 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> fn textureSampleGrad_bbb58f() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.f), 1u, vec3<f32>(1.f), vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl index 8c07d5e..fa78b8f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1u)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl index 8c07d5e..fa78b8f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1u)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl index 2cf113e..211c87f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm index 35a94b9..79969b6 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v3float = OpTypeVector %float 3 - %30 = OpConstantNull %v3float %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_bbb58f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleGrad_bbb58f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleGrad_bbb58f + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_bbb58f + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl index b766ec2..b2672b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_bbb58f() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1u, vec3<f32>(), vec3<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.0f), 1u, vec3<f32>(1.0f), vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl index 40ce7dd..59f4146 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleGrad_d4e3c5() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), vec2<f32>(1.f), vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl index 6ec5b46..abee8b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl index 6ec5b46..abee8b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl index 21f3947..7eee4a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl index 7b6d295..46f7401 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_d4e3c5(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm index cdcaae1..3156b3c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %28 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleGrad_d4e3c5 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad|ConstOffset %25 %25 %28 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad|ConstOffset %26 %26 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureSampleGrad_d4e3c5 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl index af2f0c4..7a99649 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d4e3c5() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), vec2<f32>(1.0f), vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl index e287fbe..3536a86 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, ddx: vec2<f32>, ddy: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleGrad_d65515() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1i, vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<f32>(1.f), vec2<f32>(1.f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl index 6a31475..5b13851 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl index 6a31475..5b13851 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl index 3857b57..8e08c66 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl index 84f4c0c..b269220 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_d65515(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm index 70acbbc..2feaabd 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleGrad_d65515 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad|ConstOffset %27 %27 %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleGrad_d65515 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_d65515 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_d65515 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl index ed2ec94..e627316 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d65515() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(), 1i, vec2<f32>(), vec2<f32>(), vec2<i32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<f32>(1.0f), vec2<f32>(1.0f), vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl index 3efc537..faabeef 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32> fn textureSampleGrad_e383db() { - var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1i, vec3<f32>(), vec3<f32>()); + var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.f), 1i, vec3<f32>(1.f), vec3<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl index 990fc90..87c187d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl index 990fc90..87c187d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl index fcee1d0..2ce087f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_e383db(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm index a5cff35..0e311b6 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v3float = OpTypeVector %float 3 - %30 = OpConstantNull %v3float %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_e383db = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleGrad_e383db +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_e383db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleGrad_e383db + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_e383db + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl index 6652bb6..8dfe9ae 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_e383db() { - var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(), 1i, vec3<f32>(), vec3<f32>()); + var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, vec3<f32>(1.0f), 1i, vec3<f32>(1.0f), vec3<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl index ffa7af3..dc50131 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32) -> f32 fn textureSampleLevel_02be59() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl index 9af06cb..805efd4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl index 9af06cb..805efd4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl index 2499348..50224c5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl index cf6e1f5..fe833d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_02be59(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm index 12c1f88..e1b7508 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm
@@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_02be59 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_02be59 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_02be59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl index 21cd349..bb6778c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_02be59() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl index 31146d2..f5a413c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleLevel_0b0a1b() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl index aee4c23..c221b22 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl index aee4c23..c221b22 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl index ef80252..b489559 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl index 506a971..4bd6966 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_0b0a1b(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1.0f), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm index fd46b38..e75df16 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureSampleLevel_0b0a1b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod|ConstOffset %float_1 %29 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod|ConstOffset %float_1 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_0b0a1b +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd
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 6ae1c9e..7edb2c2 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<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl index 6129b9c..046acf8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32, level: f32) -> vec4<f32> fn textureSampleLevel_0bdd9a() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl index 4ac5b0c..3062bda 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl index 4ac5b0c..3062bda 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl index 8d56eb6..7a8b340 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_0bdd9a(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm index 6c66663..c38f645 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_0bdd9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_0bdd9a +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd
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 d49f2c2..96d9d06 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<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl index 34cbdc1..3c03f3f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: i32) -> f32 fn textureSampleLevel_1b0291() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl index e474a0f..43340f6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl index e474a0f..43340f6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl index 28c9eed..85b398cb 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1b0291(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm index 9a1b35c..313063a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm
@@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %26 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_1b0291 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_1b0291 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_1b0291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl index da43fb4..ce70fc6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1b0291() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl index 98e0763..05f8d4d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32) -> f32 fn textureSampleLevel_1bf73e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl index 6a8dc74..acc99fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl index 6a8dc74..acc99fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl index 3d00082..9206cee 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1bf73e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm index 75690ee..2d0c309 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_1bf73e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_1bf73e +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_1bf73e + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_1bf73e + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl index e42cc19..a0cfa86 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1bf73e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl index 2330cfb..0acaaac 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32) -> vec4<f32> fn textureSampleLevel_265cc7() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl index bb13673..5a8cae5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl index bb13673..5a8cae5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl index 454d56b..12caf9b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl index c512ee7..d3fa969 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_265cc7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm index 1d5cd88..a9b4a82 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_265cc7 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_265cc7 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_265cc7 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_265cc7 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl index 00932fa..bbd333b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_265cc7() { - var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl index 3343ac7..7be0912 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: u32) -> f32 fn textureSampleLevel_2974eb() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl index d761407..40a8222 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl index d761407..40a8222 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl index 35c8142..5d25c30 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_2974eb(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm index 902d1d2..c418b62 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_2974eb = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_2974eb +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_2974eb + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_2974eb + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl index a01f59b..660393e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_2974eb() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl index 8673fe7..4a67499 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32) -> vec4<f32> fn textureSampleLevel_302be4() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl index 90cdd65..07474bc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl index 90cdd65..07474bc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl index 31ba66c..f69611e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl index 92ace1e..cb2e2ab 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_302be4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm index 19dc29b..3607b90 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_302be4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_302be4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_302be4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_302be4 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturn OpFunctionEnd
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 846f87f..106bdbd 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<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl index 250369f..d1713ea3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: i32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_36780e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1i, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl index 7defa37..c8a9ccc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl index 7defa37..c8a9ccc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl index f77682e..ed1e29e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_36780e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm index 1dc3c0d..cc74784 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_36780e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %33 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %37 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_36780e +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_36780e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_36780e + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_36780e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_36780e + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_36780e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl index 09aa6a3..b079b1d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36780e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1i, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl index a9d9e0f..fd7d10b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, level: u32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_36f0d3() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1u, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl index b36c713..e8395d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl index b36c713..e8395d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl index a952104..c52850d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_36f0d3(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1u), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm index aaa56db..aaca286 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,49 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_36f0d3 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %35 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_36f0d3 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_36f0d3 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleLevel_36f0d3 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl index 79a45ec..ae7e18a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36f0d3() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1u, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl index 3d2edc9..1e317bd 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: i32) -> f32 fn textureSampleLevel_3c3442() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl index 39cd161..f66c85a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl index 39cd161..f66c85a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl index ce8ebea..32dbc41 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_3c3442(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm index 2300632..3e0fb12 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_3c3442 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_3c3442 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_3c3442 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_3c3442 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl index 62d0573ec..a9c602c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_3c3442() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl index 6552683..886c480 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32) -> f32 fn textureSampleLevel_615583() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl index 634fa95..d758f54 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl index 634fa95..d758f54 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl index 8647ff8..ec871ef 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_615583(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm index 999d156..3110bc1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_615583 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_615583 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_615583 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_615583 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_615583 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_615583 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_615583 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl index 149d95c..87e11d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_615583() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl index 4bf7198..ba930c6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32) -> f32 fn textureSampleLevel_73e892() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl index 96a9806..3a307b4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl index 96a9806..3a307b4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl index 9713397..bc67215 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl index 4ab087d..976edd5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_73e892(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm index 821a1ce..c3d7743 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_73e892 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_73e892 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_73e892 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl index 9c08bdd..86e1fe5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_73e892() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl index b89cce6..04f0fc8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_749baf() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl index ca148df..c269b22 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl index ca148df..c269b22 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl index 386d748..dffb2b4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl index 4a19d9f..4dbec7a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_749baf(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm index 449a76f..ff468d3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm
@@ -44,35 +44,35 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureSampleLevel_749baf = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %31 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod|ConstOffset %28 %32 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_749baf +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureSampleLevel_749baf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl index af1e33b..e529df8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_749baf() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl index 808785e..ff080e1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: u32) -> f32 fn textureSampleLevel_941a53() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl index 45085b5..b69f521 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl index 45085b5..b69f521 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl index 148a594..ae0a450 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_941a53(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm index 5bc015b..30fc42f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_941a53 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_941a53 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleLevel_941a53 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_941a53 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl index 66ad48b..719add1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_941a53() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl index 943d287..8743f47 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32> fn textureSampleLevel_979816() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl index 0d69ae7..02e88ee 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ struct GammaTransferParams { @@ -85,7 +85,7 @@ } void textureSampleLevel_979816() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl index 0d69ae7..02e88ee 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ struct GammaTransferParams { @@ -85,7 +85,7 @@ } void textureSampleLevel_979816() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl index c826300..2edd500 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ #version 310 es @@ -54,7 +54,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } vec4 vertex_main() { @@ -123,7 +123,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void fragment_main() { @@ -186,7 +186,7 @@ uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl index 1d078bb..3820718 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ #include <metal_stdlib> @@ -62,7 +62,7 @@ } void textureSampleLevel_979816(texture2d<float, access::sample> tint_symbol_1, texture2d<float, access::sample> tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(0.0f), *(tint_symbol_4)); + float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(1.0f), *(tint_symbol_4)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm index e513142..8842b64 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ ; SPIR-V @@ -123,7 +123,7 @@ %98 = OpConstantNull %uint %void = OpTypeVoid %116 = OpTypeFunction %void - %124 = OpConstantNull %v2float + %124 = OpConstantComposite %v2float %float_1 %float_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl index 5e78e84..db84787 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl
@@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f)); ^^^^^^^^^^^^^^^^^^ @group(1) @binding(0) var arg_0 : texture_external; @@ -7,7 +7,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_979816() { - var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>()); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl index d02337a..00c7285 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32, level: u32) -> f32 fn textureSampleLevel_a12142() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl index 881bbdb..e4c44df 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl index 881bbdb..e4c44df 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl index e2e6c7d..f97f541 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_a12142(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm index e3114b3..2122eec 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,47 +44,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_a12142 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_a12142 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_a12142 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_a12142 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl index 6644810..4e2fc47 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_a12142() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl index 47bc418..1bf1c31 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32, level: f32) -> vec4<f32> fn textureSampleLevel_aab3b9() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1u, 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl index 3ff9d7d..f7a6308 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl index 3ff9d7d..f7a6308 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl index e1f41e0..4fa3fa2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_aab3b9(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm index 272d846..0eb8e9d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_aab3b9 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_aab3b9 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl index 237662c..3de46ba 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_aab3b9() { - var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl index 25468bf..1a5dae4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> fn textureSampleLevel_abfcc0() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl index 5986ace..b6d9aa9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl index 5986ace..b6d9aa9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl index 866afa3..709cf7e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl index 26f2cb2..c5b55d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_abfcc0(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm index e86f2fb..f1c7a85 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_abfcc0 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd
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 b7ef5ae..adffde9 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<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl index 1321449..4e72aec 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: i32, level: i32) -> f32 fn textureSampleLevel_ae5e39() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl index 2a89840..5515700 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl index 2a89840..5515700 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl index 7f710a2..1e48987 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae5e39(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm index e6ebe89..68f32e3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_ae5e39 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_ae5e39 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl index 297a5cf..30a48b2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae5e39() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1i, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1i, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl index c352dee..5360c5e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>, level: u32) -> f32 fn textureSampleLevel_ae92a2() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl index f0daf77..fee35d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl index f0daf77..fee35d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1u).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl index fe37bb0..46e2a3e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae92a2(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm index 0f6a549..d6313a8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %26 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_ae92a2 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_ae92a2 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_ae92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl index c485be4..674aea2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae92a2() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1u); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl index d8fefee..911fd7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32, level: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleLevel_b7c55c() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1i, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl index 2f3441f..040aa64 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl index 2f3441f..040aa64 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl index 31e5704..90dbca9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl index 8847f18..c0c5d55 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_b7c55c(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1.0f), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm index 2f00723..da6f290 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %textureSampleLevel_b7c55c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod|ConstOffset %float_1 %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_b7c55c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_b7c55c + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_b7c55c + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturn OpFunctionEnd
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 b4b4642..b156633 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<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1i, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1i, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl index bb02ef2..dcb31e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, level: f32) -> vec4<f32> fn textureSampleLevel_c32df7() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl index d48cf54..aabe9e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl index d48cf54..aabe9e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl index af5177b..4d75927 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl index d6a2800..bafe9af 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c32df7(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm index 5daeeb2..d76fe25 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_c32df7 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd
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 3aaea11..83ec451 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<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl index 7874b9b..8017850 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32) -> vec4<f32> fn textureSampleLevel_c6aca6() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.f); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1.f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl index 4455778..7fe645b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl index 4455778..7fe645b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl index b2e3dd0..62c64c1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl index a24cb0f..4797165 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c6aca6(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1.0f)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm index 7a94097..9dd42e1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm
@@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_c6aca6 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd
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 535b735..256eda0 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<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1.0f); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1.0f); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl index 5f1ee66..218f8be 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: u32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_cdfe0f() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl index 749bfc8..d9b4c1e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl index 749bfc8..d9b4c1e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl index 693c3f3..5c73085 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1u), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm index 62f94db..9af914c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_cdfe0f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %34 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSampleLevel_cdfe0f +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl index fa05fe7..afdb69d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_cdfe0f() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1u, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl index 3390f5b..f6ea285 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32> fn textureSampleLevel_dcbecb() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.f, vec3<i32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1.f, vec3<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl index 806a05f..044f68a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl index 806a05f..044f68a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl index 6b2a181..148bef4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl index 2eaac72..47f3e27 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_dcbecb(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f), int3(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f), int3(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm index 6b3a57e..9a1e533 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %29 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureSampleLevel_dcbecb = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod|ConstOffset %float_1 %29 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod|ConstOffset %float_1 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_dcbecb +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_dcbecb + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_dcbecb + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd
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 bdcaff8..e4610ad 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<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1.0f, vec3<i32>()); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1.0f, vec3<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl index 7894b70..9135882 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, level: i32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_e6ce9e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1i, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl index 62c3ca3..9b08da0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl index 62c3ca3..9b08da0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl index cdf6cd4..42a5ff3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_e6ce9e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm index 387a582..558fb64 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,49 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_e6ce9e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %35 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_e6ce9e +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_e6ce9e + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleLevel_e6ce9e + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl index 765f731..3936c9c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_e6ce9e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1i, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1i, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl index 0ce14c6..ee35dd7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32 fn textureSampleLevel_f3b2c8() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl index 81096d4..7b839f1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl index 81096d4..7b839f1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u, (1).xx).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl index 503a1bc..eab0c1b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl index 1d3faea..6028f54 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1u), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm index d98a8b7..f20fef6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %34 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureSampleLevel_f3b2c8 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %32 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod|ConstOffset %28 %34 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_f3b2c8 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %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 %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl index 8ffb28c..8057db7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_f3b2c8() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, vec2<i32>()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl index d9217fb..4d9e464 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32, level: f32, @const offset: vec2<i32>) -> vec4<f32> fn textureSampleLevel_faa6d7() { - var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.f, vec2<i32>()); + var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.f), 1u, 1.f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl index 5646cef..f5a020b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl index 5646cef..f5a020b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl index 9c1734c..b272e8f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl index a0039f0..795ca06 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1.0f), int2(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm index 74736ef..08a0c14 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureSampleLevel_faa6d7 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod|ConstOffset %float_1 %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_faa6d7 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl index 14a47e4..6799d8b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_faa6d7() { - var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(), 1u, 1.0f, vec2<i32>()); + var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, vec2<f32>(1.0f), 1u, 1.0f, vec2<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl index 6407b2c..c7af820 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl
@@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: u32, level: i32) -> f32 fn textureSampleLevel_ff11bc() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.f), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl index aaffccf..4a5f8d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl index aaffccf..4a5f8d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@ SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1).x; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl index 2791c64..03bdbc0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ff11bc(depthcube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm index 9fb572a..64f921e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,47 +44,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_ff11bc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_ff11bc +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_ff11bc + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_ff11bc + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl index 43278dd..eff31bb 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl
@@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ff11bc() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(), 1u, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3<f32>(1.0f), 1u, 1i); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl index 127f5d6..6de2b09 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>) fn textureStore_00ca64() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl index 4c43d09..8e8c418 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_00ca64() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl index 4c43d09..8e8c418 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_00ca64() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl index 1227661..5a72fd2 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl index 61e534f..b76f874 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_00ca64(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm index ec49a65..c32fe12 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_00ca64 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_00ca64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_00ca64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_00ca64 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_00ca64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_00ca64 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_00ca64 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl index 6bc9e2c..33756f1 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>; fn textureStore_00ca64() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl index 10d0c4e..b77e65e 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>) fn textureStore_0148bd() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl index 49a4ea9..6c96325 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_0148bd() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl index 49a4ea9..6c96325 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_0148bd() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl index 5b2168a..15f4a41 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl index 508c653..30137a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_0148bd(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm index 464aac9..9992d94 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0148bd = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0148bd +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0148bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0148bd + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0148bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0148bd + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0148bd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl index b9cae8b..6b62b18 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>; fn textureStore_0148bd() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl index dac61fd..a03c257 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_05ce15() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl index 27477b0..bda2006 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_05ce15() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl index 27477b0..bda2006 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_05ce15() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl index 38abe73..5021ed4 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl index 3a48638..e99c331 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_05ce15(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm index d7dca2f..250c8eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_05ce15 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_05ce15 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_05ce15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_05ce15 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_05ce15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_05ce15 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_05ce15 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl index caefa60..e5609b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>; fn textureStore_05ce15() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl index fa8db6a..91a9450 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_064c7f() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl index c9130d7..4c98b68 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_064c7f() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl index c9130d7..4c98b68 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_064c7f() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl index 06feb27..9165cd3 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_064c7f(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm index 4e3a756..52c7fa7 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.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 OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_064c7f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_064c7f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_064c7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_064c7f + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_064c7f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_064c7f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_064c7f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl index 9d55259..f177a6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>; fn textureStore_064c7f() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl index 813eec3..b97cd2c 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba16uint, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore_068641() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl index cbcf84d..c10c9cb 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_068641() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl index cbcf84d..c10c9cb 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_068641() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl index 453b7be..5989871 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl index 1d3f94f..9ad2a24 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_068641(texture3d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm index 7f48b8b..40498a9 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/068641.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_068641 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_068641 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_068641 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_068641 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_068641 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl index 1e3ae92..5e4245b 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, write>; fn textureStore_068641() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl index 1c43f8d..fbea4f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_06e49c() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl index 7ccdde8..ad485a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_06e49c() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl index 7ccdde8..ad485a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_06e49c() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl index 1c9a1cc..5380fea 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl index feafa4d..ac1d739 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_06e49c(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm index be0e588..d9bd1c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_06e49c = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_06e49c +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_06e49c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_06e49c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_06e49c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_06e49c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_06e49c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl index b9ddf2e..382a2c7 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>; fn textureStore_06e49c() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl index 6cc3fc7..56705f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>) fn textureStore_07548b() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl index 7b7e09f..a41e5c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_07548b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl index 7b7e09f..a41e5c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_07548b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl index 94e408b..8196807 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl index a943c9d..3547e963 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm index 81c6715..d700ee4 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/07548b.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_07548b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_07548b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_07548b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_07548b + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_07548b + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl index ddcfd78..d182a1c 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>; fn textureStore_07548b() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl index 3899f39..0d7bd6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>) fn textureStore_0a1a79() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl index 872f431..9cb3c26 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_0a1a79() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl index 872f431..9cb3c26 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_0a1a79() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl index 7aacbb9..67dbe37 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl index 05cd137..e912738 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_0a1a79(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm index 2a4e581..2cd4c0c 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0a1a79 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0a1a79 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0a1a79 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0a1a79 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0a1a79 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0a1a79 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0a1a79 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl index 0c98262..d30c2de 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>; fn textureStore_0a1a79() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl index f94740e..c77fc88 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_0af6b5() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl index 388ae73..ff91112 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_0af6b5() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl index 388ae73..ff91112 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_0af6b5() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl index dc7474e..ac6275c 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl index dfe2b65..14def46 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_0af6b5(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm index 33b4e6a..7a12a77 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_0af6b5 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_0af6b5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_0af6b5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_0af6b5 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_0af6b5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_0af6b5 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_0af6b5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl index d6371ca..85bfa83 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>; fn textureStore_0af6b5() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl index c2c0cd8..6323dab 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<i32>, value: vec4<u32>) fn textureStore_0c3dff() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl index dcdd179..ef167e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_0c3dff() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl index dcdd179..ef167e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_0c3dff() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl index 4366f60..7ff9d58 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl index 64d849e..99752da 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_0c3dff(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm index c8544d0..241c800 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0c3dff = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_0c3dff +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_0c3dff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_0c3dff + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0c3dff + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl index 14d2872..58787ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>; fn textureStore_0c3dff() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl index 65e450c..1895c53 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>) fn textureStore_0cc825() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl index bf58d44..23f82c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_0cc825() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl index bf58d44..23f82c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_0cc825() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl index e22d8d7..730ca7d 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl index 5f737ac..3157ac4 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_0cc825(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm index 1eeb64f..d1d4490 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0cc825 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0cc825 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0cc825 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0cc825 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0cc825 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0cc825 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0cc825 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl index 9a44567..a7b6aeb 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>; fn textureStore_0cc825() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl index 1bd0839..5f88023 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: i32, value: vec4<u32>) fn textureStore_102722() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl index cf95c7c..e3a48f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_102722() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl index cf95c7c..e3a48f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_102722() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl index c4a5d5a..f2c85aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_102722(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm index f1a4f4f..98830a8 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/102722.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 OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_102722 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_102722 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_102722 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_102722 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_102722 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl index dd665bf..7853e25 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>; fn textureStore_102722() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl index 439e2b7..5e852dc 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>) fn textureStore_158cf0() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl index b9bb3f4..4a8c1e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_158cf0() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl index b9bb3f4..4a8c1e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_158cf0() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl index f8eb6ee..7a7040b 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl index 8b86324..820b78d 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm index 57856cd..e41ab4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_158cf0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_158cf0 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_158cf0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_158cf0 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_158cf0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_158cf0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_158cf0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl index 0a13e2f..49944b6 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>; fn textureStore_158cf0() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl index 9d5ba32..b339550 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>) fn textureStore_1839f2() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl index d27947f..198f00e 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_1839f2() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl index d27947f..198f00e 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_1839f2() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl index 3d314fa..360dde1 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl index f0251ba..669e5fc 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm index c1f7242..c8d32a3 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1839f2 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_1839f2 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_1839f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1839f2 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1839f2 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl index 7da29d2..971a7bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>; fn textureStore_1839f2() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl index 3ee0b86..7382854 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>) fn textureStore_1a7d35() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl index 1c3f667..842544a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1a7d35() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl index 1c3f667..842544a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1a7d35() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl index ca69181..16992aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl index c857308..9cac721 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm index cac9cad..cea0b97 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1a7d35 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_1a7d35 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1a7d35 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_1a7d35 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_1a7d35 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_1a7d35 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_1a7d35 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl index 83b8de3..c8483a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>; fn textureStore_1a7d35() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl index b0103e8..4ea9716 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_1bbd08() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl index 21d658e..bceaccf 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_1bbd08() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl index 21d658e..bceaccf 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_1bbd08() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl index a26b65d..7d04d1f 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl index c05a7e5..81cad88 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1bbd08(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm index f1316a5..20e4438 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_1bbd08 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_1bbd08 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1bbd08 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_1bbd08 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1bbd08 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1bbd08 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1bbd08 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl index b6aa3ff..889b97a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>; fn textureStore_1bbd08() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl index cc58e9a..ee0cfd9 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) fn textureStore_1c02e7() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl index f4ad1a0..6add803 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1c02e7() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl index f4ad1a0..6add803 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1c02e7() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl index 8e9601c..28735ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl index a17b971..4229a33 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1c02e7(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm index 320d4a9..f70ea85 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1c02e7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_1c02e7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_1c02e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_1c02e7 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_1c02e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_1c02e7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_1c02e7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl index bc7cea2..81cd3a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>; fn textureStore_1c02e7() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl index 5f1165a..6817caa 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>) fn textureStore_1dc954() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl index aa78a7d..bc9dfae 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_1dc954() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl index aa78a7d..bc9dfae 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_1dc954() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl index 94daa3b..780f957 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm index 399c07d..9d7f783 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.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 OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1dc954 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_1dc954 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1dc954 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_1dc954 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_1dc954 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl index 6ea1f64..09a5154 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>; fn textureStore_1dc954() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl index ac0ac7b..743981b 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_1e20f2() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl index 1c1d0a9..37c57c2 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_1e20f2() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl index 1c1d0a9..37c57c2 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_1e20f2() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl index 45ecb44..ff9ee4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl index 85e7418..485e4e6 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm index 446cf04..9b00b86 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_1e20f2 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_1e20f2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1e20f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_1e20f2 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1e20f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1e20f2 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1e20f2 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl index 8762625..61a9732 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>; fn textureStore_1e20f2() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl index 5a8267a..eb0ff77 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>) fn textureStore_1f1ef8() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl index c38dfe8..7dc2888 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1f1ef8() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl index c38dfe8..7dc2888 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_1f1ef8() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl index 72a9bec5..5ee4edb 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl index b85f5e5..d517025 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_1f1ef8(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm index 6aff314..a92e0d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1f1ef8 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_1f1ef8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1f1ef8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1f1ef8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_1f1ef8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_1f1ef8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_1f1ef8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl index 1651670..10e652a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>; fn textureStore_1f1ef8() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl index 11c0772..409e57b 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>) fn textureStore_207fdd() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl index 4078bc2..8b06dea 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_207fdd() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl index 4078bc2..8b06dea 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_207fdd() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl index b780a95..81a7915 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl index 9e3c0e8..c050074 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm index 4c90dfc..2007bb4 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_207fdd = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_207fdd +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_207fdd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_207fdd + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_207fdd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_207fdd + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_207fdd OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl index 50d6dc5..7687fee 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>; fn textureStore_207fdd() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl index 2f1f79b..12fdc66 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) fn textureStore_22d955() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl index c998bd8..7148014 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_22d955() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl index c998bd8..7148014 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_22d955() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl index b904bcd..f05be5e 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl index 4bf37e1..78e57e3 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_22d955(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm index ac3fcad..a87e0bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_22d955 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_22d955 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_22d955 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_22d955 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_22d955 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_22d955 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_22d955 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl index 6cdb5e7..c7b43ee 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>; fn textureStore_22d955() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl index 415716e..d9c15d2 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_22f045() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl index ae1649c..ea7f63e 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_22f045() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl index ae1649c..ea7f63e 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_22f045() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl index 204ab9d..8443dcb 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl index f07f39f..69dfed2 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_22f045(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm index 69ce3d4..2e7da5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_22f045 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_22f045 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_22f045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_22f045 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_22f045 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_22f045 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_22f045 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl index 688f6a4..2b2abf6 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>; fn textureStore_22f045() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl index 09b48b1..6b799cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>) fn textureStore_2383fc() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl index 3e78178..ba95459d 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_2383fc() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl index 3e78178..ba95459d 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_2383fc() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl index 6691080..1d4c29a 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl index b56a39a..f521f18 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2383fc(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm index 4b7a731..5de3a69 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2383fc = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2383fc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2383fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_2383fc + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_2383fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_2383fc + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_2383fc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl index 58bfd01..e0a6d6f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>; fn textureStore_2383fc() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl index a0c5fcb..a9ce3e0 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_258ab0() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl index 60afdb8..c07e9c5 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_258ab0() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl index 60afdb8..c07e9c5 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_258ab0() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl index 8590cc9..84b9c35 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl index 0a3abff..c1acf06 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_258ab0(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm index 3333cbe..2d466a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_258ab0 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_258ab0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_258ab0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_258ab0 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_258ab0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_258ab0 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_258ab0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl index 40d4997..c4d6c00 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>; fn textureStore_258ab0() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl index 8edb0ae..ad36c53 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<i32>, value: vec4<u32>) fn textureStore_26bf70() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl index 7c666e2..99c6d57 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_26bf70() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl index 7c666e2..99c6d57 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_26bf70() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl index b3fe0dd..5da5639 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl index 9b32850..c206178 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_26bf70(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm index 4040d99..ff6c49d 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_26bf70 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_26bf70 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_26bf70 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_26bf70 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_26bf70 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl index 10aa757..f17425a 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>; fn textureStore_26bf70() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl index ada88c1..16dcbf6 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<i32>, value: vec4<i32>) fn textureStore_2796b4() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl index 95522d9..dca2de1 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_2796b4() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl index 95522d9..dca2de1 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_2796b4() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl index 0fc2e68..c60e59c 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2796b4(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm index 1c76893..0325344 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.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 OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2796b4 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2796b4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2796b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2796b4 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2796b4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2796b4 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2796b4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl index 60ac36f..f358f55 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>; fn textureStore_2796b4() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl index d8da3e5..19a48c3 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>) fn textureStore_285218() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl index bdd814e..d06be2b 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_285218() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl index bdd814e..d06be2b 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_285218() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl index f55cc01..f7d44c3 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_285218(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm index 72dc9e7..1443184 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/285218.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_285218 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_285218 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_285218 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_285218 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_285218 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl index b479a5b..71a3111 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>; fn textureStore_285218() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl index 1146908..51efb58 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>) fn textureStore_28a7ec() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl index 828727c..476f0f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_28a7ec() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl index 828727c..476f0f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_28a7ec() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl index 53936c4..cd0e4c2 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl index 65d7504..9b26b6b 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_28a7ec(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm index 51ce8d9..65dac0c 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_28a7ec = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_28a7ec +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_28a7ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_28a7ec + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_28a7ec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_28a7ec + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_28a7ec OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl index 01b44fa..14ce9f8 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>; fn textureStore_28a7ec() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl index d69d314..0fae6bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32float, write>, coords: i32, value: vec4<f32>) fn textureStore_2ac6c7() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl index a3e5a4c..c09574d 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_2ac6c7() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl index a3e5a4c..c09574d 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_2ac6c7() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl index dc2cb99..a975f3d 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2ac6c7(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm index 04401372..dc7dbdb 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_2ac6c7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_2ac6c7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_2ac6c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ac6c7 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2ac6c7 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl index b48d70e..8abb7ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>; fn textureStore_2ac6c7() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl index 3c0db21..9bc1cb5 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_2d2835() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl index ffe3cb5..0920cc2 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_2d2835() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl index ffe3cb5..0920cc2 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_2d2835() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl index 958833b..7b4f3ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm index cf70248..5b7d6a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_2d2835 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2d2835 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2d2835 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2d2835 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2d2835 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl index 2506162..ce653b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>; fn textureStore_2d2835() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl index 3283fb9..9b4969a 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_2e6102() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl index 5f60ae7..50a80ef 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_2e6102() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl index 5f60ae7..50a80ef 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_2e6102() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl index 2767363..1b49822 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl index 9bcd5aa..e876971 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm index 57c1ad1..1fb04e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_2e6102 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_2e6102 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2e6102 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_2e6102 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_2e6102 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_2e6102 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_2e6102 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl index 7c3458e..374522a 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>; fn textureStore_2e6102() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl index 945cd47..cd85730 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: i32, value: vec4<u32>) fn textureStore_2eb2a4() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl index 94f6628..5fece95 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_2eb2a4() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl index 94f6628..5fece95 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_2eb2a4() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl index 015e052..47ffde0 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2eb2a4(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm index 24d2ecd..bef9eb9 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.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 OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2eb2a4 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2eb2a4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2eb2a4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2eb2a4 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2eb2a4 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl index 089951d..b7ff47b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>; fn textureStore_2eb2a4() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl index 89188ea..2c3f288 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: i32, value: vec4<f32>) fn textureStore_2ed2a3() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl index 38a94e7..2e462a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_2ed2a3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl index 38a94e7..2e462a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_2ed2a3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl index e49cb93..04c9cda 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_2ed2a3(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm index d529e14..b97d0ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_2ed2a3 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_2ed2a3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_2ed2a3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ed2a3 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2ed2a3 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl index c974cc8..599c722 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>; fn textureStore_2ed2a3() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl index b4d61dc..70fa904 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>) fn textureStore_30b0b0() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl index 21e26cc..2c4e933 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_30b0b0() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl index 21e26cc..2c4e933 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_30b0b0() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl index 6e95a8b..894ec52 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl index 540c35a..611742a 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_30b0b0(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm index 4eef3b4..91e4a80 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_30b0b0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_30b0b0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_30b0b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_30b0b0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_30b0b0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_30b0b0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_30b0b0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl index 158559f..cf6003b 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>; fn textureStore_30b0b0() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl index 2cec898..c215a35 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<i32>, value: vec4<i32>) fn textureStore_31745b() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl index 6a31872..6a2450f 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_31745b() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl index 6a31872..6a2450f 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_31745b() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl index fab9cdc..a051a4d 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_31745b(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm index d401580..9827d2d 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/31745b.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 OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_31745b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_31745b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_31745b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_31745b + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_31745b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_31745b + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_31745b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl index 0280681..0652c26 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>; fn textureStore_31745b() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl index 8b66228..092d9bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_32f368() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl index 6a94d6b..2281122 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_32f368() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl index 6a94d6b..2281122 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_32f368() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl index c2bf038..5c4305d 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl index f60e099..40ee25c 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_32f368(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm index 0990ac0..26a37de 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_32f368 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_32f368 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_32f368 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_32f368 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_32f368 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl index 160e1ff..cb63ff9 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>; fn textureStore_32f368() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl index fe8f3e7..4135564 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_330b7c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl index 8cf1f94..879a714 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_330b7c() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl index 8cf1f94..879a714 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_330b7c() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl index 1a37be2..2fc62dc 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl index e08e7b1..03f8eb3 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm index 8142b42..eb78ea6 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_330b7c = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_330b7c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_330b7c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_330b7c + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_330b7c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl index e93891f..f44f87a 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>; fn textureStore_330b7c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl index 0db96c1..40d5811 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_331aee() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl index 53f938c..263c8a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_331aee() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl index 53f938c..263c8a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_331aee() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl index 150214d..0abfb90 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl index b79b25e..14e276e 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_331aee(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm index e27f41a..8b4e49e 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/331aee.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_331aee = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_331aee +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_331aee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_331aee + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_331aee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_331aee + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_331aee OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl index c56aa25..40a206b 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>; fn textureStore_331aee() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl index 4119114..32257a3 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>) fn textureStore_33cec0() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl index 86c488b..08d323b 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_33cec0() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl index 86c488b..08d323b 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_33cec0() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl index 26fe35d..82aa4fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl index 0f73a0c..7a12c75 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_33cec0(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm index b62536b..0a3d4cd 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_33cec0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_33cec0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_33cec0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_33cec0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_33cec0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_33cec0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_33cec0 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl index 5ee34fe..b8abfcf 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>; fn textureStore_33cec0() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl index f8299a6..f83d1fc 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_37ffd4() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl index 7bafb82..5694464 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_37ffd4() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl index 7bafb82..5694464 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_37ffd4() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl index 1c7cfb6..f503dba 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl index 85bb75c..ccd0fe7 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_37ffd4(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm index b865d9c..588fc63 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_37ffd4 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_37ffd4 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_37ffd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_37ffd4 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_37ffd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_37ffd4 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_37ffd4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl index 1142990..de7daec 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>; fn textureStore_37ffd4() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl index a7bf084..681e37c 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) fn textureStore_38e8d7() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl index 8c2dd24..77ffb74 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_38e8d7() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl index 8c2dd24..77ffb74 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_38e8d7() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl index d898f5e..bc05eea 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl index ac1cd5a..1609b52 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_38e8d7(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm index 5bf4b4a..fad0694 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_38e8d7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_38e8d7 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_38e8d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_38e8d7 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_38e8d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_38e8d7 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_38e8d7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl index 080c74f..c89dfae 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>; fn textureStore_38e8d7() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl index 028ac8a..cb12161 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) fn textureStore_3a52ac() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl index b0fd8b1..90738ec 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_3a52ac() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl index b0fd8b1..90738ec 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_3a52ac() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl index 604ece2..3ff7e90 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl index b40ea4b..1c566a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_3a52ac(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm index 2208840..c1f5cbc 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3a52ac = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_3a52ac +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_3a52ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_3a52ac + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_3a52ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_3a52ac + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_3a52ac OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl index 241766e..7ff9b1e 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>; fn textureStore_3a52ac() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl index 170257b..febc992 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_3bb7a1() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl index 879dea5..b8ad4cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_3bb7a1() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl index 879dea5..b8ad4cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_3bb7a1() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl index 52c2ee4..e903047 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl index 8cd1fce..e00c212 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_3bb7a1(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm index 042c17d..c506090 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_3bb7a1 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3bb7a1 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_3bb7a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3bb7a1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3bb7a1 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl index 0b7b71d..941bf58 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>; fn textureStore_3bb7a1() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl index e6050ab..3db2638 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: i32, value: vec4<u32>) fn textureStore_3bec15() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl index cc77637..1ee37ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_3bec15() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl index cc77637..1ee37ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_3bec15() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl index b08f7bb..9dbe6b0 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_3bec15(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm index 617f660..44546d3 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.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 OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3bec15 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3bec15 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_3bec15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3bec15 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3bec15 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl index 54a9a18..73d8e4b 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>; fn textureStore_3bec15() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl index 599a5aa..2d6cdca 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>) fn textureStore_3c1937() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl index 3c35d23..7de0dd0 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_3c1937() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl index 3c35d23..7de0dd0 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_3c1937() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl index 66c76cc..670464d 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm index ceae29a..003ee50 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3c1937 = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl index b26afa2..7da0a5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>; fn textureStore_3c1937() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl index 9bddb8a..5e013cc 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>) fn textureStore_3d6f01() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl index 24d481d..ed58795 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_3d6f01() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl index 24d481d..ed58795 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_3d6f01() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl index 04287c4..a6989b8 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm index 658ccf1..45b0b4d 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.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 OpCapability Image1D @@ -42,34 +42,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3d6f01 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3d6f01 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_3d6f01 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3d6f01 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3d6f01 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl index ec89f38..bc5feb5 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>; fn textureStore_3d6f01() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl index 8383481..7ea64eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_40c455() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl index a34c109..181450b 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_40c455() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl index a34c109..181450b 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_40c455() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl index cf38074..91e06cc 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl index aca14e6..b90a54c 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm index d6742e1..1990f95 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/40c455.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_40c455 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_40c455 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_40c455 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_40c455 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_40c455 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_40c455 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_40c455 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl index 17ec04a..9e144de 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>; fn textureStore_40c455() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl index 086f268..b54bc38 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>) fn textureStore_4288fc() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl index 53c3ae0..baac045 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_4288fc() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl index 53c3ae0..baac045 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_4288fc() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl index 0d55884..dcc4af3 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl index e865bdc..7642d26 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm index 0251157..2c8b573 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_4288fc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_4288fc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_4288fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_4288fc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_4288fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_4288fc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_4288fc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl index 5a88ca4..ed36fbe 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>; fn textureStore_4288fc() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl index a81a84b..7f2af68 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba32uint, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore_441ba8() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl index c2c79ae..487e37a 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_441ba8() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl index c2c79ae..487e37a 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_441ba8() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl index 5dfe9b5..6c29a7e 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl index 4d5772e..8135665 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_441ba8(texture3d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm index f90cc46..3dc4d15 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_441ba8 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_441ba8 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_441ba8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_441ba8 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_441ba8 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl index 6014c40..e50241e 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, write>; fn textureStore_441ba8() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl index 1cd12d9..072c3f6 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_44daa7() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl index 987f074..c2c0090 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_44daa7() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl index 987f074..c2c0090 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_44daa7() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl index a45332f..b3d2ffd 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl index 65604af..c13854b 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_44daa7(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm index 3a6ccca..1096e90 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_44daa7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_44daa7 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_44daa7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_44daa7 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_44daa7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_44daa7 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_44daa7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl index 1deb175..8e5eb43 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>; fn textureStore_44daa7() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl index e05a98c..baeedc4 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>) fn textureStore_486500() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl index 5eb3313..6907fa7 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_486500() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl index 5eb3313..6907fa7 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_486500() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl index 88ef8d3..071e1b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl index 9007838..4718b8d 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_486500(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm index da34216..f89fab7 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/486500.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_486500 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_486500 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_486500 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_486500 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_486500 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl index bbb5e94..7008d69 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>; fn textureStore_486500() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl index bb7e882..3fad484 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>) fn textureStore_4c454f() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl index 4ab4c39..8b72e1b 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_4c454f() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl index 4ab4c39..8b72e1b 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_4c454f() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl index f608d9c..bf71b07 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm index 7d89bf6..addc252 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,38 +40,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4c454f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_4c454f +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_4c454f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_4c454f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_4c454f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_4c454f + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_4c454f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl index 8b60830..77a6758 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>; fn textureStore_4c454f() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl index f239e4e..bde5c95 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>) fn textureStore_4d359d() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl index 39ad70a..4c1b12c 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_4d359d() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl index 39ad70a..4c1b12c 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_4d359d() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl index db817af..b100b64 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_4d359d(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm index a218220..7971519 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,40 +39,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4d359d = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_4d359d +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_4d359d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_4d359d + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_4d359d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_4d359d + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_4d359d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl index aeeef6a..1dd8775 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>; fn textureStore_4d359d() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl index d79d3d2..14faea8 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_4fc057() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl index d485fcc..2ae84da 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_4fc057() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl index d485fcc..2ae84da 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_4fc057() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl index 4853b57..7e577e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl index f3c66c8..9c97891 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_4fc057(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm index 22d3d46..f15b6dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_4fc057 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_4fc057 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_4fc057 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_4fc057 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_4fc057 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl index bc88011..34cfaeb 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>; fn textureStore_4fc057() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl index ffd82b2..5ae5d4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>) fn textureStore_506a71() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl index 4d77b11..cdf1190 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_506a71() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl index 4d77b11..cdf1190 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_506a71() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl index f67d858..73ff967 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm index 9315213..64a7f82 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/506a71.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 OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_506a71 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_506a71 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_506a71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_506a71 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_506a71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_506a71 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_506a71 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl index a37a117..59d771d 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>; fn textureStore_506a71() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl index e8a74d2..cdcebf9 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>) fn textureStore_52f503() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl index dc3e1b7..d3308a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_52f503() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl index dc3e1b7..d3308a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_52f503() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl index 3b9248f..53ede68 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl index 0930d28..73f8fee 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm index cd373e8..86ebd4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/52f503.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_52f503 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_52f503 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_52f503 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_52f503 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_52f503 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl index 61ad0ec..d273fee 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>; fn textureStore_52f503() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl index 1a7d7ba..4b376a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_5841f8() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl index f8784c5..386fd2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_5841f8() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl index f8784c5..386fd2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_5841f8() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl index a1b2d3c..3bbe9a3 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl index 691fffc..5a95763 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm index 27b2fce..2e43444 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_5841f8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_5841f8 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5841f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_5841f8 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_5841f8 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl index 8881fcc..f3aa2f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>; fn textureStore_5841f8() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl index 482beb0..f3eef94 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_59a0ab() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl index 1a0d898..994a8a0 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_59a0ab() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl index 1a0d898..994a8a0 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_59a0ab() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl index d89b2c7..a6864fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl index b77b7dd..57fd487 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_59a0ab(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm index d2ecfac..37818bf 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_59a0ab = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_59a0ab +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_59a0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_59a0ab + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_59a0ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_59a0ab + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_59a0ab OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl index 2b2d44c..c2b7e2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>; fn textureStore_59a0ab() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl index cc7d1ac..f45005d 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: i32, value: vec4<i32>) fn textureStore_5a2f8f() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl index 7d0eb61..26c2342 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_5a2f8f() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl index 7d0eb61..26c2342 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_5a2f8f() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl index dde59b8..52905ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_5a2f8f(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm index 83dac17..4775bee 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5a2f8f = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl index 55a791e..c7b1590 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>; fn textureStore_5a2f8f() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl index 9b03422..e6d8690 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>) fn textureStore_5bc4f3() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl index 729e6f7..9e4fe3f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_5bc4f3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl index 729e6f7..9e4fe3f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_5bc4f3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl index 9cb2ab3..1f9ae17 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm index 297fd44..5353efe 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5bc4f3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_5bc4f3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5bc4f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_5bc4f3 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_5bc4f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_5bc4f3 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_5bc4f3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl index 840e0f3..e3486d7 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>; fn textureStore_5bc4f3() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl index 9b84f6d..5dd56c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>) fn textureStore_5ddc61() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl index e916cf9..1638ba0 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_5ddc61() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl index e916cf9..1638ba0 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_5ddc61() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl index a94cc1a..46377e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl index e8b62ee..de56731 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_5ddc61(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm index 68f61b9..4b17a36 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5ddc61 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_5ddc61 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_5ddc61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_5ddc61 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_5ddc61 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_5ddc61 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_5ddc61 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl index de8f621..33304b9 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>; fn textureStore_5ddc61() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl index cb02f5f..3353cbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_5f9a49() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl index da08207..fbcfe31 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_5f9a49() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl index da08207..fbcfe31 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_5f9a49() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl index 24392ad..91a0642 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl index f6b2d1b..6e12956 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm index 7a64ab7..0fbfca7 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_5f9a49 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_5f9a49 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5f9a49 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_5f9a49 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_5f9a49 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl index 97187c8..fb329f4 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>; fn textureStore_5f9a49() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl index ba90890..3a27370 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>) fn textureStore_602b5a() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl index 4f0db55..e18bdc5 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_602b5a() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl index 4f0db55..e18bdc5 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_602b5a() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl index c41e010..f391359 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm index 93c189d..84cabb6 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.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 OpCapability Image1D @@ -40,33 +40,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_602b5a = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_602b5a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_602b5a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_602b5a + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_602b5a + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl index a7c2f31..28692b5 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>; fn textureStore_602b5a() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl index bbc6c40..57bbc65 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_60975f() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl index ab19974..1bd75dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_60975f() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl index ab19974..1bd75dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_60975f() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl index acc1ece..9d806ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl index bc1e09a..d2473f0 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_60975f(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm index fb1d691..710cc14 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_60975f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_60975f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_60975f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_60975f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_60975f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl index ac8ff98..ad81fa1 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>; fn textureStore_60975f() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl index 92689e1..f97502d 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_658a74() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl index d3dcb5b..51f28b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_658a74() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl index d3dcb5b..51f28b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_658a74() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl index 0921ddc..0a88f99 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_658a74(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm index 5607331..146556e 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_658a74 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_658a74 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_658a74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_658a74 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_658a74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_658a74 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_658a74 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl index 9c8cc3a..79d89b0 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>; fn textureStore_658a74() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl index 7920724..90a24f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<i32>, value: vec4<u32>) fn textureStore_682fd6() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl index b8d65cc..8d85e07 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_682fd6() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl index b8d65cc..8d85e07 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_682fd6() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl index 9fddf06..5bb5624 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_682fd6(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm index 420e450..60b8553 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.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 OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_682fd6 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_682fd6 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_682fd6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_682fd6 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_682fd6 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl index 15cae1d..9b4623d 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>; fn textureStore_682fd6() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl index 0b39052..f9d3b89 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_699a1b() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl index f3d78c6..8b6de07 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_699a1b() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl index f3d78c6..8b6de07 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_699a1b() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl index 6b80b95..30ce8f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl index 4c739f8..b564cde 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm index b8f5015..41ee6a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_699a1b = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_699a1b +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_699a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_699a1b + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_699a1b + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl index 7585470..7856f3d 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>; fn textureStore_699a1b() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl index 1c97c4c..36cf30c 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: i32, value: vec4<f32>) fn textureStore_6b75c3() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl index df1c070..fd7b01f 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_6b75c3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl index df1c070..fd7b01f 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_6b75c3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl index a92d69a..df1eb89 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_6b75c3(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm index 1c3b265..24633ee4 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_6b75c3 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_6b75c3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_6b75c3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_6b75c3 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_6b75c3 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl index 6022b91..1619dae 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>; fn textureStore_6b75c3() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl index bc36f22..01c9531 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: i32, value: vec4<i32>) fn textureStore_6b80d2() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl index a2e5c73..cb4329d 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_6b80d2() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl index a2e5c73..cb4329d 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_6b80d2() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl index b73343e..b93c6f8 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_6b80d2(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm index f5112ee..66cc308 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6b80d2 = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl index 7cd817f..a5b1793 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>; fn textureStore_6b80d2() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl index fe20069..a24470c 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<i32>, value: vec4<u32>) fn textureStore_6cff2e() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl index a9f96b4..e55171a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_6cff2e() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl index a9f96b4..e55171a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_6cff2e() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl index f4458c4..7f42837 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl index 8a1d610..ae8205a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_6cff2e(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm index 8e80a59..782456e 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6cff2e = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_6cff2e +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_6cff2e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_6cff2e + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_6cff2e + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl index bc09df8..981078b 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>; fn textureStore_6cff2e() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl index a50c0f3..a517a3b 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) fn textureStore_6da692() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl index 69e93a9..385f6ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_6da692() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl index 69e93a9..385f6ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_6da692() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl index 81dc6f5..9b05317 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl index 49e92c6..7651247 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_6da692(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm index d1101ca..47f56f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6da692 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_6da692 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_6da692 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_6da692 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_6da692 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_6da692 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_6da692 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl index 0a1021c..9a9c631 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>; fn textureStore_6da692() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl index b909a03..5007c92 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>) fn textureStore_6f8642() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl index 61a68cf..a36060d 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_6f8642() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl index 61a68cf..a36060d 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_6f8642() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl index 9471f9b..e171c61 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl index 233e519..1432b7b 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_6f8642(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm index 2ce57c6..1e32ffc 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6f8642 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_6f8642 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_6f8642 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_6f8642 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_6f8642 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_6f8642 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_6f8642 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl index 631e3c1..b876de3 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>; fn textureStore_6f8642() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl index ff91148..7066bfd 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_726472() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl index 9c62e84..9c1e543 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_726472() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl index 9c62e84..9c1e543 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_726472() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl index f2fa086..32c1a37 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_726472(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm index ead0f58..704d910 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/726472.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 OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_726472 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_726472 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_726472 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_726472 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_726472 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_726472 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_726472 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl index 87ae30c..b3d9d88 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>; fn textureStore_726472() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl index 93ebb93..33cd067 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>) fn textureStore_72fa64() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl index 86c2bf4..08f8ef1 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_72fa64() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl index 86c2bf4..08f8ef1 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_72fa64() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl index a9d5d54..21ad721 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_72fa64(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm index 4b421e0..cac18fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,39 +40,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_72fa64 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_72fa64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_72fa64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_72fa64 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_72fa64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_72fa64 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_72fa64 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl index cb9be28..690fc0a 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>; fn textureStore_72fa64() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl index feaede0..b931dcd 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_731349() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl index c6837de..7a9dbc7 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_731349() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl index c6837de..7a9dbc7 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_731349() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl index 4d2e294..dbcd2e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl index 7d335e8..119a556 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_731349(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm index 8649d67..8bba6aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/731349.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_731349 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_731349 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_731349 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_731349 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_731349 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_731349 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_731349 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl index b659a87..db21ca0 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>; fn textureStore_731349() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl index 5498680..38fcded 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_73bbbc() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl index c0e09e4..c09389e 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_73bbbc() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl index c0e09e4..c09389e 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_73bbbc() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl index ea855e6..6f63069 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl index 3c94e3d..bb254bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm index 2f84672..624ad76 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_73bbbc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_73bbbc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_73bbbc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_73bbbc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_73bbbc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_73bbbc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_73bbbc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl index 9ad3038..9365f30 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>; fn textureStore_73bbbc() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl index ddb2812..a9c9a47 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<i32>, value: vec4<i32>) fn textureStore_752da6() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl index f65a408..cc81976 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_752da6() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl index f65a408..cc81976 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_752da6() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl index 03ea3bb..04635eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl index 74e6cb2..3c0fbb7 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_752da6(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm index 35b57fb..ea0c305 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/752da6.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_752da6 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_752da6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_752da6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_752da6 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_752da6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_752da6 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_752da6 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl index 9f4e06d..c953b69 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>; fn textureStore_752da6() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl index 464bf9d3..0d358c9 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>) fn textureStore_779d14() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl index 253eae2..1e23d25 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_779d14() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl index 253eae2..1e23d25 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_779d14() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl index 01199d0..2f3f36f 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl index 0593462..b53b070 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm index affc5ee..76d74c7 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_779d14 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_779d14 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_779d14 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_779d14 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_779d14 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_779d14 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_779d14 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl index baf07fd..e602376 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>; fn textureStore_779d14() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl index 8cfde02..d3629f3e 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<i32>, value: vec4<u32>) fn textureStore_77c0ae() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl index 31d53b3..7515172 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_77c0ae() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl index 31d53b3..7515172 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_77c0ae() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl index 34d7601..087a5ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl index b5866746b..cbf7a2e 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_77c0ae(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm index 7af51d4..40e4b5a 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_77c0ae = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_77c0ae +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_77c0ae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_77c0ae + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_77c0ae + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl index ddc73be..3a10e1e 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>; fn textureStore_77c0ae() { - textureStore(arg_0, vec2<i32>(), vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl index dd6f0c7..685eb9f 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>) fn textureStore_7bb211() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl index b1a3e77..a9bc91a 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_7bb211() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl index b1a3e77..a9bc91a 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_7bb211() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl index 54eca42..60815c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_7bb211(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm index fde30d8..faf3ec8 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,40 +39,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7bb211 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7bb211 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_7bb211 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_7bb211 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_7bb211 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_7bb211 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_7bb211 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl index 99a7440..1badce8 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>; fn textureStore_7bb211() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl index c22261a..a3533ae 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>) fn textureStore_7cec8d() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl index a1a4198..76104fa 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_7cec8d() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl index a1a4198..76104fa 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_7cec8d() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl index 0de3060..3846e41 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl index 912d7c6..235e6f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_7cec8d(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm index 5ad44d2..572588a 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7cec8d = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_7cec8d +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_7cec8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_7cec8d + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_7cec8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_7cec8d + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_7cec8d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl index 1faa341..2b21dc1 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>; fn textureStore_7cec8d() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl index 72e6ebf..a900407 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>) fn textureStore_7cf6e7() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl index 59d0258..7579779 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_7cf6e7() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl index 59d0258..7579779 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_7cf6e7() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl index cfd83a1..25d6a3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl index 9140107..e3638bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm index b2ba99c..51603e9 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_7cf6e7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_7cf6e7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_7cf6e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_7cf6e7 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_7cf6e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_7cf6e7 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_7cf6e7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl index 8a201a5..2a97507 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>; fn textureStore_7cf6e7() { - textureStore(arg_0, vec2<u32>(), vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl index edc32c8..984453f 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: i32, value: vec4<f32>) fn textureStore_7f7fae() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl index 35b13ff..20e42ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_7f7fae() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl index 35b13ff..20e42ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_7f7fae() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl index 979f11c..af3eb5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_7f7fae(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm index d1ac585..33d5647 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_7f7fae = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_7f7fae +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_7f7fae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7f7fae + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_7f7fae + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl index 49ff2d8..c61ad6c 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>; fn textureStore_7f7fae() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl index 0f067ae..81e4032 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<i32>, value: vec4<i32>) fn textureStore_804942() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl index 00b02cb..0b2fa1a 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_804942() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl index 00b02cb..0b2fa1a 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_804942() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl index 7dc0f6d..6588904 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl index f963439..e70c679 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_804942(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm index dc2c206..8c2d46b 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/804942.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_804942 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_804942 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_804942 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_804942 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_804942 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_804942 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_804942 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl index 06f7057..9b4303e 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>; fn textureStore_804942() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl index 6ae5db8..c71296c 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_805dae() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl index 8abb6a8..da9071f 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_805dae() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl index 8abb6a8..da9071f 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_805dae() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl index 2265a73..3a71c44 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl index 2dfb818..63a5354 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_805dae(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm index 55b1d44..0e9c38e 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/805dae.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_805dae = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_805dae +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_805dae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_805dae + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_805dae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_805dae + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_805dae OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl index 7bc5067..33f56c0 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>; fn textureStore_805dae() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl index 4f8e627..1876a36 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: i32, value: vec4<u32>) fn textureStore_83bcc1() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl index 4ca45ec..7a4268f 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_83bcc1() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl index 4ca45ec..7a4268f 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_83bcc1() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl index da45ded..09d5cff 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_83bcc1(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm index 666ea11..14d6958 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.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 OpCapability Image1D @@ -42,34 +42,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_83bcc1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_83bcc1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_83bcc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_83bcc1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_83bcc1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl index 436eb30..68d5b9b 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>; fn textureStore_83bcc1() { - textureStore(arg_0, 1i, vec4<u32>()); + textureStore(arg_0, 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl index eb4d490..bb90202 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: i32, value: vec4<f32>) fn textureStore_872747() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl index abc0d22..2291734 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_872747() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl index abc0d22..2291734 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_872747() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl index 2c0461e..a019adb 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_872747(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm index 844f37d..d2782d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/872747.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 OpCapability Image1D @@ -40,33 +40,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_872747 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_872747 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_872747 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_872747 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_872747 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl index 61eaae0..e4ef2e3 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>; fn textureStore_872747() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl index e60ce76..e6e6f59 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>) fn textureStore_8b9310() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl index 1f1d30e..a37807c 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_8b9310() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl index 1f1d30e..a37807c 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_8b9310() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl index 59512b5..9cb69a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl index 770d905..3aa438e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm index 65de91fe..156cfba 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_8b9310 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_8b9310 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8b9310 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_8b9310 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8b9310 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_8b9310 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_8b9310 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl index d0c0b53..a889fbc 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>; fn textureStore_8b9310() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl index d0da1e5..fc96428 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>) fn textureStore_8bb287() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl index 418bf3d..13c15d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_8bb287() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl index 418bf3d..13c15d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_8bb287() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl index da9c76e..88d82ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl index 4421d40..161933ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm index e1b64d2..e5cbdf9 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8bb287 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_8bb287 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8bb287 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8bb287 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_8bb287 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8bb287 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8bb287 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl index 7719279..cb13b94 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>; fn textureStore_8bb287() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl index acabd4f..4b54c88 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>) fn textureStore_8c76e9() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl index 26e5180..e02ac1d 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_8c76e9() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl index 26e5180..e02ac1d 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_8c76e9() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl index 9d8c1e2..bb42d24 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm index 14e31d5..b5bcf8b 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.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 OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8c76e9 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8c76e9 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8c76e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8c76e9 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8c76e9 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl index ec93e21..463506d 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>; fn textureStore_8c76e9() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl index 528d387..0b2ba1e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>) fn textureStore_8dc54f() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl index 3ef51f2..aba5618 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_8dc54f() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl index 3ef51f2..aba5618 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_8dc54f() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl index 5fbcbfd..9362b4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl index 0f2343a..1e8931d 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm index 5431052..fad4e33 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8dc54f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8dc54f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8dc54f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8dc54f + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8dc54f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8dc54f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8dc54f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl index 0c6ac87..9e1854b 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>; fn textureStore_8dc54f() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl index d2873c5..b44640c 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) fn textureStore_8e0479() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl index e0b8d20..da6deff 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_8e0479() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl index e0b8d20..da6deff 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_8e0479() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl index e0ceb95..2627dfc 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl index 3dcab98..978ed33 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8e0479(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm index 000407d..9f289d7 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8e0479 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_8e0479 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8e0479 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8e0479 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_8e0479 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8e0479 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8e0479 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl index 17e9e38..af55e34 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>; fn textureStore_8e0479() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl index 99f57b3..a480331 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>) fn textureStore_8ed9f8() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl index bfb203d..16243af 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_8ed9f8() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl index bfb203d..16243af 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_8ed9f8() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl index 5a1fd66..09b9fde 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl index 007a32d..ab487c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm index 78944bf..a9dbbc1 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_8ed9f8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_8ed9f8 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8ed9f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_8ed9f8 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8ed9f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_8ed9f8 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_8ed9f8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl index 8fed674..ff44f47 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>; fn textureStore_8ed9f8() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl index 9424ac8..46e19fe 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<i32>, value: vec4<i32>) fn textureStore_8f71a1() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl index be336b8..6f061193 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_8f71a1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl index be336b8..6f061193 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_8f71a1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl index 42ace3d..6532b28 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl index 0e8dc88..1e99a20 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8f71a1(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm index c903b5c..ab44bfc 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8f71a1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8f71a1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8f71a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8f71a1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8f71a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8f71a1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8f71a1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl index 5ce5918..1a31821 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>; fn textureStore_8f71a1() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl index eca69e7..67c5919 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>) fn textureStore_8ff674() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl index 478e857..c6cdd61 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_8ff674() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl index 478e857..c6cdd61 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_8ff674() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl index dc5d86b..f4e1a12 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl index ae3354e..36217d2 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_8ff674(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm index d97d70a..af1a902 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8ff674 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_8ff674 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8ff674 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_8ff674 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_8ff674 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_8ff674 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_8ff674 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl index b313be4..16987ba 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>; fn textureStore_8ff674() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl index 2867992..975f7af8 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>) fn textureStore_958353() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl index 8326837..5f297ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_958353() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl index 8326837..5f297ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_958353() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl index 4116d9d..fe84ee9 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_958353(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm index a0fd2d7..44b3868 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/958353.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 OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_958353 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_958353 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_958353 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_958353 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_958353 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl index f945b20..6bb8ca5 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>; fn textureStore_958353() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl index 27385b3..7bd958b 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>) fn textureStore_959d94() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl index 0053ebc..82bdc37 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_959d94() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl index 0053ebc..82bdc37 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_959d94() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl index 3d498b4..07d78e2 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm index 071ba77..c724ae5 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/959d94.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_959d94 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_959d94 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_959d94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_959d94 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_959d94 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl index 548a878..afe005c 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>; fn textureStore_959d94() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl index b98336c..a75661c 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>) fn textureStore_95e452() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl index db2e297..503b09c 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_95e452() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl index db2e297..503b09c 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_95e452() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl index c17fdcb..989356b 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl index 327ad00..ead888b 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm index 391ed7c..ccb6e02 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/95e452.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_95e452 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_95e452 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_95e452 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_95e452 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_95e452 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl index 2f18a92..0d427eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>; fn textureStore_95e452() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl index a51a043..21dfadf 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: i32, value: vec4<i32>) fn textureStore_969534() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl index 5d1107b..578cfd4 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_969534() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl index 5d1107b..578cfd4 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_969534() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl index c994c24..24eabf8 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_969534(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm index aab85aa..aec627b 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_969534 = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl index d17bfa3..19b6ea0 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>; fn textureStore_969534() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl index 6992b60..0441d2e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>) fn textureStore_9938b7() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl index 1a75432..ba535ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_9938b7() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl index 1a75432..ba535ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_9938b7() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl index e448b68..8015329 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl index 5e76a03..3ae47d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9938b7(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm index 265968a..021bbf2 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9938b7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_9938b7 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9938b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9938b7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_9938b7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_9938b7 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_9938b7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl index ed0775f..9c01171 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>; fn textureStore_9938b7() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl index d38ba03..82ddcfd 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<i32>, value: vec4<i32>) fn textureStore_9a3ecc() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl index bf19cfe..4b3d041 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_9a3ecc() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl index bf19cfe..4b3d041 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_9a3ecc() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl index 3867d2a..5439a69 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl index e91a11a..46065b8 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9a3ecc(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm index 6ca3785..f380281 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9a3ecc = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9a3ecc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_9a3ecc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9a3ecc + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9a3ecc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9a3ecc + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9a3ecc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl index 072ae70..bda3795 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>; fn textureStore_9a3ecc() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl index 805fbf2..2151746 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_9d8668() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl index 29f00cc..5bba758 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_9d8668() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl index 29f00cc..5bba758 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_9d8668() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl index bb433ee..b57014e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl index 83778bb..e29a571 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9d8668(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm index 7c36c49..5e76d8e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_9d8668 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_9d8668 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9d8668 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_9d8668 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_9d8668 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_9d8668 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_9d8668 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl index 8f30157..7143481 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>; fn textureStore_9d8668() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl index 689372f..b7ffc63 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_9d9cd5() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl index 0f43b6b..7672b64 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_9d9cd5() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl index 0f43b6b..7672b64 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_9d9cd5() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl index 9c483a0..ee29fa5 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl index 9468846..c22478b 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9d9cd5(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm index 3b2ba58..b83df32 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_9d9cd5 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9d9cd5 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_9d9cd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9d9cd5 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9d9cd5 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl index e02d2ec..abf7d5a 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>; fn textureStore_9d9cd5() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl index 12480b4..426ca06 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<i32>, value: vec4<i32>) fn textureStore_9e3ec5() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl index a1dff9c..53f7cf2 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_9e3ec5() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl index a1dff9c..53f7cf2 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_9e3ec5() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl index 292c9f6..b783004 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl index 96998a48..c010dce 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9e3ec5(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm index 5293d47..11456a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9e3ec5 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9e3ec5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_9e3ec5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9e3ec5 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9e3ec5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9e3ec5 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9e3ec5 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl index b2822b3..d7d82b45 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>; fn textureStore_9e3ec5() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl index 57f9e41..2a4613f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>) fn textureStore_9f5318() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl index 5f0a281..20545e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_9f5318() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl index 5f0a281..20545e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_9f5318() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl index 71eab29..ca32724 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm index e767dff..f835ad6 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.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 OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f5318 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_9f5318 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_9f5318 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_9f5318 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9f5318 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl index ba762db..0423d90 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>; fn textureStore_9f5318() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl index a100c70..5f1421e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>) fn textureStore_9f7cea() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl index dfb1462..cde637f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_9f7cea() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl index dfb1462..cde637f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_9f7cea() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl index 4639026..31ef353 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl index 6ebb568..fa5cafb 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_9f7cea(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm index 09b1bdd..46c70ef 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f7cea = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_9f7cea +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9f7cea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9f7cea + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_9f7cea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_9f7cea + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_9f7cea OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl index 2cfc03b..5c720b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>; fn textureStore_9f7cea() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl index 8bc5822..36452ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>) fn textureStore_a0f96e() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl index eac237c..7d90c8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_a0f96e() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl index eac237c..7d90c8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_a0f96e() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl index 0d052c7..5b65139 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl index 55416ec..ce17fe2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm index be0bd69..17183b6 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_a0f96e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_a0f96e +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a0f96e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_a0f96e + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_a0f96e + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl index 4903cd3..3137e47 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>; fn textureStore_a0f96e() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl index 1457ecf..a52b228 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>) fn textureStore_a1352c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl index 852989a..b4c166d 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_a1352c() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl index 852989a..b4c166d 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_a1352c() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl index 69fba50..501d60e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl index e5aa80c..3d3ba49 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm index 88ec228..b9dc68a 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a1352c = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_a1352c +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_a1352c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_a1352c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a1352c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_a1352c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a1352c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl index d4ae406..b4f55b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>; fn textureStore_a1352c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl index 90266ad..f05d977 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>) fn textureStore_a4c338() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl index 887d1a0..ee3762e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_a4c338() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl index 887d1a0..ee3762e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_a4c338() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl index be778b9..519937c 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm index 700238c..f5e8d49 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_a4c338 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_a4c338 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_a4c338 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_a4c338 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_a4c338 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl index 16909fd..2402733 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>; fn textureStore_a4c338() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl index d35de02..a433269 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>) fn textureStore_a5e80d() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl index beae873..b49b2b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_a5e80d() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl index beae873..b49b2b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_a5e80d() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl index 0a280ee..7bacb6e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl index b44bcec..e62a4b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm index 6710bee..51445f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_a5e80d = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_a5e80d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_a5e80d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_a5e80d + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_a5e80d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_a5e80d + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_a5e80d OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl index 523b068..b73edc0 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>; fn textureStore_a5e80d() { - textureStore(arg_0, vec3<u32>(), vec4<f32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl index 8bbdda2..88d4427 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_a6a986() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl index 7129e59..968e9e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_a6a986() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl index 7129e59..968e9e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_a6a986() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl index 0d9db4a..f6bfd77 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl index ecbe6c0..a0fbb24 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a6a986(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm index 08a3859..8ca98d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_a6a986 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_a6a986 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_a6a986 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_a6a986 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a6a986 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_a6a986 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a6a986 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl index a07b3a2..c3c9122 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>; fn textureStore_a6a986() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl index 5ad97c0..af252c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>) fn textureStore_a6e78f() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl index 5c32fa3..0a6ae37 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_a6e78f() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl index 5c32fa3..0a6ae37 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_a6e78f() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl index f45f6f8..6c096f8 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm index d235078..2aa2d9f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a6e78f = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl index 38db884..6ba26bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>; fn textureStore_a6e78f() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl index 45ac5b0..2f4a346 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>) fn textureStore_a9426c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl index 8faa545..31cd280 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_a9426c() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl index 8faa545..31cd280 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_a9426c() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl index f7d65f9..18456eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl index f4bbdd4..a6335ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm index 9439679..9d2d116a 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a9426c = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_a9426c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a9426c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_a9426c + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_a9426c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_a9426c + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_a9426c OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl index 186d1fc..989163f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>; fn textureStore_a9426c() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl index 99c466d..50fe83b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rg32uint, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore_ac67aa() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl index 94cd654..e9ccad1 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_ac67aa() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl index 94cd654..e9ccad1 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_ac67aa() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl index a72b97c..1c5794d 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_ac67aa(texture3d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm index e18042c..49759cd 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.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 OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ac67aa = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_ac67aa +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_ac67aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ac67aa + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_ac67aa + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl index c3095f6..c7dabf6 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, write>; fn textureStore_ac67aa() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl index 3eb9078..76ebe28 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>) fn textureStore_aeb38a() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl index 207747f..ff6dc85 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_aeb38a() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl index 207747f..ff6dc85 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_aeb38a() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl index 64d71b7..41fe949 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl index 816a29f..e3850a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm index 9823237..7a929b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_aeb38a = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_aeb38a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_aeb38a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_aeb38a + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_aeb38a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_aeb38a + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_aeb38a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl index 9730895..da77ab2 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>; fn textureStore_aeb38a() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl index 8de25c8..48348e86 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>) fn textureStore_b42fd3() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl index 2f7eb46..e520a5a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_b42fd3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl index 2f7eb46..e520a5a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_b42fd3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl index 921ec9e..d76d7a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl index a888409..66bc913 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm index e550c49..f08c969 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b42fd3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_b42fd3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_b42fd3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_b42fd3 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_b42fd3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_b42fd3 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_b42fd3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl index 70f8fdc..fc1889f 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>; fn textureStore_b42fd3() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl index 2cc6a65..b4b450d 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<i32>, value: vec4<i32>) fn textureStore_b706b1() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl index c479e1c..06f2c5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_b706b1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl index c479e1c..06f2c5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_b706b1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl index 6e27e12..272b927 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl index 270213d..d4aaf4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_b706b1(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm index 659af46..9c0194d 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b706b1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_b706b1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_b706b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_b706b1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_b706b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_b706b1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_b706b1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl index 3c379e9..28f1c41 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>; fn textureStore_b706b1() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl index c04799d..b4c02c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>) fn textureStore_b70ded() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl index 9fda40d..6613e71 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_b70ded() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl index 9fda40d..6613e71 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_b70ded() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl index 947fb46..4cf6aa4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm index 4bef24b..08e69b1 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b70ded = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl index 59d6f6c..13327aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>; fn textureStore_b70ded() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl index f23a704..d560e0f 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>) fn textureStore_b76ff3() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl index 2310856..a18fa2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_b76ff3() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl index 2310856..a18fa2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_b76ff3() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl index 31af161..d3797b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl index 04029e7..a9577d6 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm index 54f83ae..8458d84 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b76ff3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_b76ff3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_b76ff3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_b76ff3 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_b76ff3 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl index 13c012c..eec1af1 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>; fn textureStore_b76ff3() { - textureStore(arg_0, vec2<u32>(), vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl index 2503648..701e100 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>) fn textureStore_b77161() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl index 59dffc9..0aa372c 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_b77161() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl index 59dffc9..0aa372c 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_b77161() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl index 260b776..794ce4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm index 714b0c9..3addc3d 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm
@@ -41,7 +41,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b77161 = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl index c32b685..202e528 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>; fn textureStore_b77161() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl index 5474078..5729ba5 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<i32>, value: vec4<i32>) fn textureStore_bbcb7f() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl index 0278d0e..427dbec 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_bbcb7f() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl index 0278d0e..427dbec 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<int4> arg_0 : register(u0, space1); void textureStore_bbcb7f() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl index fbe98a8..b6ba883 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl index 1d091ab..835ba76 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_bbcb7f(texture2d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm index 7a21498..23fa748 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bbcb7f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_bbcb7f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_bbcb7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_bbcb7f + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_bbcb7f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_bbcb7f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_bbcb7f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl index 3f24147..d168e22 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>; fn textureStore_bbcb7f() { - textureStore(arg_0, vec2<i32>(), vec4<i32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl index 2ec8e59..792576a 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<i32>, value: vec4<f32>) fn textureStore_be6e30() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl index 43f6c7e..8205b6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_be6e30() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl index 43f6c7e..8205b6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<float4> arg_0 : register(u0, space1); void textureStore_be6e30() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl index 9df8efd..b5fc1e6 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl index acb6216..f2cc5a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_be6e30(texture2d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm index 0a47c20..9f4ba46 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_be6e30 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_be6e30 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_be6e30 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_be6e30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_be6e30 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_be6e30 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_be6e30 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl index cf77394..8a92711 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>; fn textureStore_be6e30() { - textureStore(arg_0, vec2<i32>(), vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl index 2169dff..a3405b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: i32, value: vec4<i32>) fn textureStore_bf775c() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl index 5928868..6a7b2e0 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_bf775c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl index 5928868..6a7b2e0 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_bf775c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl index 3d8210b..4d6d5d9 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_bf775c(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm index 34825d5..7465b1f 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bf775c = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl index 7e0e3fc..028926c 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>; fn textureStore_bf775c() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl index c3727f5..2b11e1d 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>) fn textureStore_c1f29e() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl index 8b2154a..237f855 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_c1f29e() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl index 8b2154a..237f855 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_c1f29e() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl index f99aee7..d753b62 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm index 5f99a79..3c052e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_c1f29e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_c1f29e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_c1f29e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c1f29e + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_c1f29e + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl index 0b929ae..8a8f8bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>; fn textureStore_c1f29e() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl index 3263299..851fa1b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>) fn textureStore_c2ca46() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl index f8e5aee..ad4c44b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_c2ca46() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl index f8e5aee..ad4c44b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_c2ca46() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl index 2155bb1..6be181b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl index 43cef9a..437604c 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm index 3e8f100..21a9c28 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c2ca46 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_c2ca46 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_c2ca46 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_c2ca46 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_c2ca46 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_c2ca46 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_c2ca46 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl index 2598ef9..a6a5957 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>; fn textureStore_c2ca46() { - textureStore(arg_0, vec2<u32>(), 1u, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl index ad57368..2fd65bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>) fn textureStore_c32905() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl index 8bb2be1..86085c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_c32905() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl index 8bb2be1..86085c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<int4> arg_0 : register(u0, space1); void textureStore_c32905() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl index 1992aea..22d00c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl index 5365b9d..e156740 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_c32905(texture2d_array<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm index 81e223f..9f673bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c32905 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c32905 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_c32905 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_c32905 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_c32905 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_c32905 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_c32905 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl index 1f62744..fac0821 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>; fn textureStore_c32905() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<i32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl index bee0ccf..5eb1877 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_c5af1e() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl index ba59f43..2d35b3f 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_c5af1e() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl index ba59f43..2d35b3f 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_c5af1e() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl index 7e8006d..98e6513 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl index 5421957..783a491 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_c5af1e(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm index 415c2a8..7e95195 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_c5af1e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_c5af1e +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_c5af1e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_c5af1e + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_c5af1e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_c5af1e + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_c5af1e OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl index 003aee2..311449a 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>; fn textureStore_c5af1e() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl index 32ab308..52c9c3a 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>) fn textureStore_c863be() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl index e6948ca..d9045bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_c863be() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl index e6948ca..d9045bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_c863be() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl index bbe2282..12951ee 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_c863be(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm index 711b604..dd01bb3 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_c863be = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_c863be +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_c863be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_c863be + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_c863be + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl index 627c0ca..e81dd25 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>; fn textureStore_c863be() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl index fcca551..6b297eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>) fn textureStore_cb3b0b() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl index 643e053..f1e2314 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_cb3b0b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl index 643e053..f1e2314 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_cb3b0b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl index 7d048d2..295aab0 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl index 070eb53..7883aab 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm index 8220c1d..167bfdc 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_cb3b0b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_cb3b0b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_cb3b0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_cb3b0b + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_cb3b0b + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl index 4d7d2c0..11741a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>; fn textureStore_cb3b0b() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl index aff8c5c..d81dc9f 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>) fn textureStore_d26166() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl index f98702f..11e8bfa 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_d26166() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl index f98702f..11e8bfa 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<uint4> arg_0 : register(u0, space1); void textureStore_d26166() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl index ea57840..6888a47 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm index b619746..c34f375 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm
@@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d26166 = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl index 9ae6acf..db59747 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>; fn textureStore_d26166() { - textureStore(arg_0, 1u, vec4<u32>()); + textureStore(arg_0, 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl index 4477682..bfeba0d 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_d55e65() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl index 2da0b0d..0b27d0c 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_d55e65() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl index 2da0b0d..0b27d0c 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_d55e65() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl index a13f035..9ace954 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl index 2ba46c3..6b43ae2 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_d55e65(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm index 6a858f4..5a162fb 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_d55e65 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_d55e65 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_d55e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_d55e65 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_d55e65 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_d55e65 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_d55e65 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl index 75e91b5..4785793 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>; fn textureStore_d55e65() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl index 94fa33e..ab49aa8 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: i32, value: vec4<i32>) fn textureStore_d73b5c() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl index 85e4777..1fcecc8 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_d73b5c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl index 85e4777..1fcecc8 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_d73b5c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl index c564d6d..5f80189 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_d73b5c(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm index b2c5b3a..344da4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm
@@ -41,7 +41,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d73b5c = OpFunction %void None %13
diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl index 24581f7..929882d 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>; fn textureStore_d73b5c() { - textureStore(arg_0, 1i, vec4<i32>()); + textureStore(arg_0, 1i, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl index 0430ac6..7988b6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>) fn textureStore_d82b0a() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl index 9eb672e..f31d34a 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_d82b0a() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl index 9eb672e..f31d34a 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_d82b0a() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl index 283430c..37ecb79 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm index 78fb6b6..ead28bf 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.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 OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d82b0a = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_d82b0a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_d82b0a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_d82b0a + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_d82b0a + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl index 840ebef..0c4c779 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>; fn textureStore_d82b0a() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl index a285481..2d38fb3 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>) fn textureStore_db92a2() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl index 0cc9f6f..0ecc939 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_db92a2() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl index 0cc9f6f..0ecc939 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_db92a2() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl index 67c6b85..ce1044e 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl index 1e319a7..a099a41 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm index e708f64..d95aecd 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_db92a2 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_db92a2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_db92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_db92a2 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_db92a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_db92a2 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_db92a2 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl index 3d6717e..c9152d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>; fn textureStore_db92a2() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl index b974b11..522cf94 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_dd7d81() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl index 598b811..7db1220 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_dd7d81() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl index 598b811..7db1220 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_dd7d81() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl index 8106b77..82932b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl index 15ec0e7..8b7e58d 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_dd7d81(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm index 205afdd..0ca8cbe 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_dd7d81 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_dd7d81 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_dd7d81 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_dd7d81 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_dd7d81 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_dd7d81 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_dd7d81 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl index 4c1f529..652c180 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>; fn textureStore_dd7d81() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl index 65fa8b5..fcae4f7 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>) fn textureStore_dde364() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl index c35dda3..377f6a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_dde364() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl index c35dda3..377f6a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_dde364() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl index 45be760..fbffd16 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_dde364(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm index 02a9709..6f48965 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,38 +40,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dde364 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_dde364 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_dde364 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_dde364 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_dde364 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_dde364 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_dde364 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl index 22cf9bb..0ba15ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>; fn textureStore_dde364() { - textureStore(arg_0, vec2<i32>(), 1i, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1i, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl index 77739a0..40f235e 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>) fn textureStore_de4b94() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl index e830000..4242e4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_de4b94() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl index e830000..4242e4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<int4> arg_0 : register(u0, space1); void textureStore_de4b94() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl index 8402154..3d16bb9 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm index b5ffea9..d9fd4d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.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 OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_de4b94 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_de4b94 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_de4b94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_de4b94 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_de4b94 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl index bdd4cad..154031e 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>; fn textureStore_de4b94() { - textureStore(arg_0, 1u, vec4<i32>()); + textureStore(arg_0, 1u, vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl index 437f7f2..aa0c6bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>) fn textureStore_df2ca4() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl index baf4f2f..f7b8f08 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_df2ca4() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl index baf4f2f..f7b8f08 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_df2ca4() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl index eea8131..c0a6eb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl index 00b2bb9..d837be8 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_df2ca4(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm index 401fcfb..2bb379f 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_df2ca4 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_df2ca4 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_df2ca4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_df2ca4 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_df2ca4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_df2ca4 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_df2ca4 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl index a70a6fa..5b7143b 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>; fn textureStore_df2ca4() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<f32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl index 5f998f9..d84183f 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>) fn textureStore_dfa9a1() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl index 2e48f79..28cbdd2 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_dfa9a1() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl index 2e48f79..28cbdd2 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<float4> arg_0 : register(u0, space1); void textureStore_dfa9a1() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl index 22747d5..27d7aad 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_dfa9a1(texture2d_array<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm index 1ab8b71..8917383 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_dfa9a1 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_dfa9a1 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_dfa9a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_dfa9a1 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_dfa9a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_dfa9a1 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_dfa9a1 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl index a930131..0c3ebaa 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>; fn textureStore_dfa9a1() { - textureStore(arg_0, vec2<u32>(), 1i, vec4<f32>()); + textureStore(arg_0, vec2<u32>(1u), 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl index 9621682..abc13b1 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>) fn textureStore_dffb13() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl index 84db8e5..6bf3dd3 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_dffb13() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl index 84db8e5..6bf3dd3 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2DArray<uint4> arg_0 : register(u0, space1); void textureStore_dffb13() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl index 65218a9..212a8bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_dffb13(texture2d_array<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm index 8df8e48..a8676ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm
@@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,39 +40,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dffb13 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_dffb13 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_dffb13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_dffb13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_dffb13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_dffb13 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_dffb13 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl index b7fb947..e1cdbc5 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>; fn textureStore_dffb13() { - textureStore(arg_0, vec2<i32>(), 1u, vec4<u32>()); + textureStore(arg_0, vec2<i32>(1i), 1u, vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl index b7e07e0..9c47a30 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>) fn textureStore_e7c6d8() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl index 87e9182..42109cc 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_e7c6d8() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl index 87e9182..42109cc 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_e7c6d8() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl index 85510ef..d38883f 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm index e9be8b7..fae0eed 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_e7c6d8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_e7c6d8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_e7c6d8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e7c6d8 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e7c6d8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl index 3e17151..0ba10b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>; fn textureStore_e7c6d8() { - textureStore(arg_0, 1u, vec4<f32>()); + textureStore(arg_0, 1u, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl index 68ab40b..293ba3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: i32, value: vec4<f32>) fn textureStore_e885e8() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl index 0faa237..59304c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_e885e8() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl index 0faa237..59304c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture1D<float4> arg_0 : register(u0, space1); void textureStore_e885e8() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl index 3bea09b..0c4ce64 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_e885e8(texture1d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm index 4e0f0a3..d4c6bf7 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.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 OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_e885e8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_e885e8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_e885e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e885e8 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e885e8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl index 4cc3fb9..bcfb579 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>; fn textureStore_e885e8() { - textureStore(arg_0, 1i, vec4<f32>()); + textureStore(arg_0, 1i, vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl index 8d6a6aa..c6af8b8 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>) fn textureStore_e8cbf7() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl index c5cfb67..1ee115e 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_e8cbf7() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl index c5cfb67..1ee115e 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture2D<uint4> arg_0 : register(u0, space1); void textureStore_e8cbf7() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl index 2b6995d..076296d 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl index e263440..dcc460b 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm index 38ad68a..1ae9ed8 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_e8cbf7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_e8cbf7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_e8cbf7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e8cbf7 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e8cbf7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_e8cbf7 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_e8cbf7 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl index 33cb1d3..48c3fd0 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>; fn textureStore_e8cbf7() { - textureStore(arg_0, vec2<u32>(), vec4<u32>()); + textureStore(arg_0, vec2<u32>(1u), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl index 35292f6..93b133c 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_eb702f() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl index 5bc0b80..fc003fc 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_eb702f() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl index 5bc0b80..fc003fc 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_eb702f() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl index dbf8045..939999e 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl index bac111e..56021c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_eb702f(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm index 8e0f51a..fbb6f18 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.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 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_eb702f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_eb702f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_eb702f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_eb702f + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_eb702f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_eb702f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_eb702f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl index 0e86ad2..449e726 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>; fn textureStore_eb702f() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl index 4393ba0..8f44b9f 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<i32>, value: vec4<i32>) fn textureStore_eb78b9() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl index 67a03a2..04cd8ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_eb78b9() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl index 67a03a2..04cd8ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_eb78b9() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl index ff3eaea..fae6231 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl index 038f1f4..3d0f17b 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_eb78b9(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm index fd0eaa0..a257eea 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.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 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_eb78b9 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_eb78b9 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_eb78b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_eb78b9 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_eb78b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_eb78b9 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_eb78b9 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl index c200bb2..0b3dd17 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>; fn textureStore_eb78b9() { - textureStore(arg_0, vec3<i32>(), vec4<i32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl index 9e299d1..a238c3a 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<i32>, value: vec4<f32>) fn textureStore_ee6acc() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl index 8193759..8d61677 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_ee6acc() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl index 8193759..8d61677 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<float4> arg_0 : register(u0, space1); void textureStore_ee6acc() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl index 46568a9..2349a9e 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_ee6acc(texture3d<float, access::write> tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm index 3a82903..98e9265 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.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 OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_ee6acc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_ee6acc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_ee6acc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %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 %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_ee6acc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_ee6acc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ee6acc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ee6acc OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl index 377310e..0bfb99b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>; fn textureStore_ee6acc() { - textureStore(arg_0, vec3<i32>(), vec4<f32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<f32>(1.0f)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl index 83185c7..c5f3264 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<r32uint, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore_ef9f2f() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl index fb51122..0dd0e1c 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_ef9f2f() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl index fb51122..0dd0e1c 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_ef9f2f() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl index 5a8142a..fddab83 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl index a9ba91d..1b3e79c 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_ef9f2f(texture3d<uint, access::write> tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm index 1398642..df69de9 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ef9f2f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_ef9f2f +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_ef9f2f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ef9f2f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_ef9f2f + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl index 9a0b5cb..913ab9e 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, write>; fn textureStore_ef9f2f() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl index e73dc3e..d342458 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>) fn textureStore_f1e6d3() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl index b02d310..e660717 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_f1e6d3() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl index b02d310..e660717 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<int4> arg_0 : register(u0, space1); void textureStore_f1e6d3() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl index ba30681..7c4ec44 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl
@@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() {
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl index 06ddbc1..7bdf79d 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl
@@ -2,7 +2,7 @@ using namespace metal; void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol {
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm index 3b45b31..d7b74d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.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 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f1e6d3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_f1e6d3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_f1e6d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %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 %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_f1e6d3 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_f1e6d3 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl index a68c2ec..2906295 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>; fn textureStore_f1e6d3() { - textureStore(arg_0, vec3<u32>(), vec4<i32>()); + textureStore(arg_0, vec3<u32>(1u), vec4<i32>(1i)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl index 431978d..5ed24d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl
@@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d<rgba8uint, write>, coords: vec3<i32>, value: vec4<u32>) fn textureStore_f8dead() { - textureStore(arg_0, vec3<i32>(), vec4<u32>()); + textureStore(arg_0, vec3<i32>(1i), vec4<u32>(1u)); } @vertex
diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl index 660c7b4..3e79f4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@ RWTexture3D<uint4> arg_0 : register(u0, space1); void textureStore_f8dead() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol {
diff --git