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/var/cross/041cb0.wgsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl
index ef35ef8..d9899e3 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl
@@ -23,8 +23,8 @@
// fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
fn cross_041cb0() {
- var arg_0 = vec3<f32>();
- var arg_1 = vec3<f32>();
+ var arg_0 = vec3<f32>(1.f);
+ var arg_1 = vec3<f32>(1.f);
var res: vec3<f32> = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl
index 272645f..01264e7 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl
@@ -1,6 +1,6 @@
void cross_041cb0() {
- float3 arg_0 = (0.0f).xxx;
- float3 arg_1 = (0.0f).xxx;
+ float3 arg_0 = (1.0f).xxx;
+ float3 arg_1 = (1.0f).xxx;
float3 res = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl
index 272645f..01264e7 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl
@@ -1,6 +1,6 @@
void cross_041cb0() {
- float3 arg_0 = (0.0f).xxx;
- float3 arg_1 = (0.0f).xxx;
+ float3 arg_0 = (1.0f).xxx;
+ float3 arg_1 = (1.0f).xxx;
float3 res = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl
index 87cb9a3..f31f8e1 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl
@@ -1,8 +1,8 @@
#version 310 es
void cross_041cb0() {
- vec3 arg_0 = vec3(0.0f);
- vec3 arg_1 = vec3(0.0f);
+ vec3 arg_0 = vec3(1.0f);
+ vec3 arg_1 = vec3(1.0f);
vec3 res = cross(arg_0, arg_1);
}
@@ -23,8 +23,8 @@
precision mediump float;
void cross_041cb0() {
- vec3 arg_0 = vec3(0.0f);
- vec3 arg_1 = vec3(0.0f);
+ vec3 arg_0 = vec3(1.0f);
+ vec3 arg_1 = vec3(1.0f);
vec3 res = cross(arg_0, arg_1);
}
@@ -39,8 +39,8 @@
#version 310 es
void cross_041cb0() {
- vec3 arg_0 = vec3(0.0f);
- vec3 arg_1 = vec3(0.0f);
+ vec3 arg_0 = vec3(1.0f);
+ vec3 arg_1 = vec3(1.0f);
vec3 res = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl
index 4966939..657d9cb 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void cross_041cb0() {
- float3 arg_0 = float3(0.0f);
- float3 arg_1 = float3(0.0f);
+ float3 arg_0 = float3(1.0f);
+ float3 arg_1 = float3(1.0f);
float3 res = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm
index f7a1245..3fe3bc6 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 37
+; Bound: 38
; Schema: 0
OpCapability Shader
- %19 = OpExtInstImport "GLSL.std.450"
+ %21 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -34,42 +34,43 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %14 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
- %23 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %18 = OpConstantNull %v3float
+ %25 = OpTypeFunction %v4float
%cross_041cb0 = OpFunction %void None %9
%12 = OpLabel
- %arg_0 = OpVariable %_ptr_Function_v3float Function %14
- %arg_1 = OpVariable %_ptr_Function_v3float Function %14
- %res = OpVariable %_ptr_Function_v3float Function %14
- OpStore %arg_0 %14
- OpStore %arg_1 %14
- %20 = OpLoad %v3float %arg_0
- %21 = OpLoad %v3float %arg_1
- %18 = OpExtInst %v3float %19 Cross %20 %21
- OpStore %res %18
+ %arg_0 = OpVariable %_ptr_Function_v3float Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3float Function %18
+ %res = OpVariable %_ptr_Function_v3float Function %18
+ OpStore %arg_0 %15
+ OpStore %arg_1 %15
+ %22 = OpLoad %v3float %arg_0
+ %23 = OpLoad %v3float %arg_1
+ %20 = OpExtInst %v3float %21 Cross %22 %23
+ OpStore %res %20
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
- %25 = OpLabel
- %26 = OpFunctionCall %void %cross_041cb0
+%vertex_main_inner = OpFunction %v4float None %25
+ %27 = OpLabel
+ %28 = OpFunctionCall %void %cross_041cb0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %28 = OpLabel
- %29 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %29
+ %30 = OpLabel
+ %31 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %31
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %32 = OpLabel
- %33 = OpFunctionCall %void %cross_041cb0
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %cross_041cb0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %35 = OpLabel
- %36 = OpFunctionCall %void %cross_041cb0
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %cross_041cb0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl
index 019e81b..fa2f691 100644
--- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl
@@ -1,6 +1,6 @@
fn cross_041cb0() {
- var arg_0 = vec3<f32>();
- var arg_1 = vec3<f32>();
+ var arg_0 = vec3<f32>(1.0f);
+ var arg_1 = vec3<f32>(1.0f);
var res : vec3<f32> = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl
index 39258c8..cc7409f 100644
--- a/test/tint/builtins/gen/var/cross/9857cb.wgsl
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl
@@ -25,8 +25,8 @@
// fn cross(vec3<f16>, vec3<f16>) -> vec3<f16>
fn cross_9857cb() {
- var arg_0 = vec3<f16>();
- var arg_1 = vec3<f16>();
+ var arg_0 = vec3<f16>(f16());
+ var arg_1 = vec3<f16>(f16());
var res: vec3<f16> = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl
index c249f4f..f1706c4 100644
--- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
enable f16;
fn cross_9857cb() {
- var arg_0 = vec3<f16>();
- var arg_1 = vec3<f16>();
+ var arg_0 = vec3<f16>(f16());
+ var arg_1 = vec3<f16>(f16());
var res : vec3<f16> = cross(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl
index 752a7bd..dbea6a0 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl
@@ -23,7 +23,7 @@
// fn pack2x16float(vec2<f32>) -> u32
fn pack2x16float_0e97b3() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.f);
var res: u32 = pack2x16float(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl
index 649e6f1..101f1f2 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16float_0e97b3() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16float(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl
index 649e6f1..101f1f2 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16float_0e97b3() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16float(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl
index ccefb26..e41a07f 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl
@@ -1,7 +1,7 @@
#version 310 es
void pack2x16float_0e97b3() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packHalf2x16(arg_0);
}
@@ -22,7 +22,7 @@
precision mediump float;
void pack2x16float_0e97b3() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packHalf2x16(arg_0);
}
@@ -37,7 +37,7 @@
#version 310 es
void pack2x16float_0e97b3() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packHalf2x16(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl
index d72649a..9d3f17d 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void pack2x16float_0e97b3() {
- float2 arg_0 = float2(0.0f);
+ float2 arg_0 = float2(1.0f);
uint res = as_type<uint>(half2(arg_0));
}
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm
index 7855476..d384bb2 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 38
+; Bound: 39
; Schema: 0
OpCapability Shader
- %19 = OpExtInstImport "GLSL.std.450"
+ %21 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -33,42 +33,43 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %14 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %15 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %18 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
- %23 = OpConstantNull %uint
- %24 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %25 = OpConstantNull %uint
+ %26 = OpTypeFunction %v4float
%pack2x16float_0e97b3 = OpFunction %void None %9
%12 = OpLabel
- %arg_0 = OpVariable %_ptr_Function_v2float Function %14
- %res = OpVariable %_ptr_Function_uint Function %23
- OpStore %arg_0 %14
- %20 = OpLoad %v2float %arg_0
- %17 = OpExtInst %uint %19 PackHalf2x16 %20
- OpStore %res %17
+ %arg_0 = OpVariable %_ptr_Function_v2float Function %18
+ %res = OpVariable %_ptr_Function_uint Function %25
+ OpStore %arg_0 %15
+ %22 = OpLoad %v2float %arg_0
+ %19 = OpExtInst %uint %21 PackHalf2x16 %22
+ OpStore %res %19
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
- %26 = OpLabel
- %27 = OpFunctionCall %void %pack2x16float_0e97b3
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %pack2x16float_0e97b3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %29 = OpLabel
- %30 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %30
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %33 = OpLabel
- %34 = OpFunctionCall %void %pack2x16float_0e97b3
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %pack2x16float_0e97b3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %36 = OpLabel
- %37 = OpFunctionCall %void %pack2x16float_0e97b3
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %pack2x16float_0e97b3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl
index 27bed46..a0049c0 100644
--- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl
@@ -1,5 +1,5 @@
fn pack2x16float_0e97b3() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.0f);
var res : u32 = pack2x16float(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl
index d5f475e..e0ca978 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl
@@ -23,7 +23,7 @@
// fn pack2x16snorm(vec2<f32>) -> u32
fn pack2x16snorm_6c169b() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.f);
var res: u32 = pack2x16snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl
index c9a6e51..ef98643 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16snorm_6c169b() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl
index c9a6e51..ef98643 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16snorm_6c169b() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl
index 06e70da..671e3e9 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl
@@ -1,7 +1,7 @@
#version 310 es
void pack2x16snorm_6c169b() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packSnorm2x16(arg_0);
}
@@ -22,7 +22,7 @@
precision mediump float;
void pack2x16snorm_6c169b() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packSnorm2x16(arg_0);
}
@@ -37,7 +37,7 @@
#version 310 es
void pack2x16snorm_6c169b() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packSnorm2x16(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl
index 64c72cf..cca6392 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void pack2x16snorm_6c169b() {
- float2 arg_0 = float2(0.0f);
+ float2 arg_0 = float2(1.0f);
uint res = pack_float_to_snorm2x16(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm
index daad82d..bf9981b 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 38
+; Bound: 39
; Schema: 0
OpCapability Shader
- %19 = OpExtInstImport "GLSL.std.450"
+ %21 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -33,42 +33,43 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %14 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %15 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %18 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
- %23 = OpConstantNull %uint
- %24 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %25 = OpConstantNull %uint
+ %26 = OpTypeFunction %v4float
%pack2x16snorm_6c169b = OpFunction %void None %9
%12 = OpLabel
- %arg_0 = OpVariable %_ptr_Function_v2float Function %14
- %res = OpVariable %_ptr_Function_uint Function %23
- OpStore %arg_0 %14
- %20 = OpLoad %v2float %arg_0
- %17 = OpExtInst %uint %19 PackSnorm2x16 %20
- OpStore %res %17
+ %arg_0 = OpVariable %_ptr_Function_v2float Function %18
+ %res = OpVariable %_ptr_Function_uint Function %25
+ OpStore %arg_0 %15
+ %22 = OpLoad %v2float %arg_0
+ %19 = OpExtInst %uint %21 PackSnorm2x16 %22
+ OpStore %res %19
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
- %26 = OpLabel
- %27 = OpFunctionCall %void %pack2x16snorm_6c169b
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %pack2x16snorm_6c169b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %29 = OpLabel
- %30 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %30
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %33 = OpLabel
- %34 = OpFunctionCall %void %pack2x16snorm_6c169b
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %pack2x16snorm_6c169b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %36 = OpLabel
- %37 = OpFunctionCall %void %pack2x16snorm_6c169b
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %pack2x16snorm_6c169b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl
index 406794b..ad7697a 100644
--- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl
@@ -1,5 +1,5 @@
fn pack2x16snorm_6c169b() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.0f);
var res : u32 = pack2x16snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl
index 521e446..6be7de7 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl
@@ -23,7 +23,7 @@
// fn pack2x16unorm(vec2<f32>) -> u32
fn pack2x16unorm_0f08e4() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.f);
var res: u32 = pack2x16unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl
index 3f37f6a..fcb4bea 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16unorm_0f08e4() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl
index 3f37f6a..fcb4bea 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@
}
void pack2x16unorm_0f08e4() {
- float2 arg_0 = (0.0f).xx;
+ float2 arg_0 = (1.0f).xx;
uint res = tint_pack2x16unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl
index 374bacf..b888043 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl
@@ -1,7 +1,7 @@
#version 310 es
void pack2x16unorm_0f08e4() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packUnorm2x16(arg_0);
}
@@ -22,7 +22,7 @@
precision mediump float;
void pack2x16unorm_0f08e4() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packUnorm2x16(arg_0);
}
@@ -37,7 +37,7 @@
#version 310 es
void pack2x16unorm_0f08e4() {
- vec2 arg_0 = vec2(0.0f);
+ vec2 arg_0 = vec2(1.0f);
uint res = packUnorm2x16(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl
index 5433a6d..9e4aec4 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void pack2x16unorm_0f08e4() {
- float2 arg_0 = float2(0.0f);
+ float2 arg_0 = float2(1.0f);
uint res = pack_float_to_unorm2x16(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm
index 6fd23d6..49aaa65 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 38
+; Bound: 39
; Schema: 0
OpCapability Shader
- %19 = OpExtInstImport "GLSL.std.450"
+ %21 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -33,42 +33,43 @@
%void = OpTypeVoid
%9 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %14 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %15 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %18 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
- %23 = OpConstantNull %uint
- %24 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %25 = OpConstantNull %uint
+ %26 = OpTypeFunction %v4float
%pack2x16unorm_0f08e4 = OpFunction %void None %9
%12 = OpLabel
- %arg_0 = OpVariable %_ptr_Function_v2float Function %14
- %res = OpVariable %_ptr_Function_uint Function %23
- OpStore %arg_0 %14
- %20 = OpLoad %v2float %arg_0
- %17 = OpExtInst %uint %19 PackUnorm2x16 %20
- OpStore %res %17
+ %arg_0 = OpVariable %_ptr_Function_v2float Function %18
+ %res = OpVariable %_ptr_Function_uint Function %25
+ OpStore %arg_0 %15
+ %22 = OpLoad %v2float %arg_0
+ %19 = OpExtInst %uint %21 PackUnorm2x16 %22
+ OpStore %res %19
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
- %26 = OpLabel
- %27 = OpFunctionCall %void %pack2x16unorm_0f08e4
+%vertex_main_inner = OpFunction %v4float None %26
+ %28 = OpLabel
+ %29 = OpFunctionCall %void %pack2x16unorm_0f08e4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %29 = OpLabel
- %30 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %30
+ %31 = OpLabel
+ %32 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %32
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %33 = OpLabel
- %34 = OpFunctionCall %void %pack2x16unorm_0f08e4
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %pack2x16unorm_0f08e4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %36 = OpLabel
- %37 = OpFunctionCall %void %pack2x16unorm_0f08e4
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %pack2x16unorm_0f08e4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl
index db3a331..2b7ffb2 100644
--- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl
@@ -1,5 +1,5 @@
fn pack2x16unorm_0f08e4() {
- var arg_0 = vec2<f32>();
+ var arg_0 = vec2<f32>(1.0f);
var res : u32 = pack2x16unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl
index 378a21f..846ce98 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl
@@ -23,7 +23,7 @@
// fn pack4x8snorm(vec4<f32>) -> u32
fn pack4x8snorm_4d22e7() {
- var arg_0 = vec4<f32>();
+ var arg_0 = vec4<f32>(1.f);
var res: u32 = pack4x8snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl
index bdf414b..c972c3c 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@
}
void pack4x8snorm_4d22e7() {
- float4 arg_0 = (0.0f).xxxx;
+ float4 arg_0 = (1.0f).xxxx;
uint res = tint_pack4x8snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl
index bdf414b..c972c3c 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@
}
void pack4x8snorm_4d22e7() {
- float4 arg_0 = (0.0f).xxxx;
+ float4 arg_0 = (1.0f).xxxx;
uint res = tint_pack4x8snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl
index d7f6483..769ce4f 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl
@@ -1,7 +1,7 @@
#version 310 es
void pack4x8snorm_4d22e7() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packSnorm4x8(arg_0);
}
@@ -22,7 +22,7 @@
precision mediump float;
void pack4x8snorm_4d22e7() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packSnorm4x8(arg_0);
}
@@ -37,7 +37,7 @@
#version 310 es
void pack4x8snorm_4d22e7() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packSnorm4x8(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl
index 5463f99..49f2d32 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void pack4x8snorm_4d22e7() {
- float4 arg_0 = float4(0.0f);
+ float4 arg_0 = float4(1.0f);
uint res = pack_float_to_snorm4x8(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm
index 74247cd..64f0b03 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 36
+; Bound: 37
; Schema: 0
OpCapability Shader
- %17 = OpExtInstImport "GLSL.std.450"
+ %19 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -32,41 +32,42 @@
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
- %21 = OpConstantNull %uint
- %22 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %23 = OpConstantNull %uint
+ %24 = OpTypeFunction %v4float
%pack4x8snorm_4d22e7 = OpFunction %void None %9
%12 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function %5
- %res = OpVariable %_ptr_Function_uint Function %21
- OpStore %arg_0 %5
- %18 = OpLoad %v4float %arg_0
- %15 = OpExtInst %uint %17 PackSnorm4x8 %18
- OpStore %res %15
+ %res = OpVariable %_ptr_Function_uint Function %23
+ OpStore %arg_0 %14
+ %20 = OpLoad %v4float %arg_0
+ %17 = OpExtInst %uint %19 PackSnorm4x8 %20
+ OpStore %res %17
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
- %24 = OpLabel
- %25 = OpFunctionCall %void %pack4x8snorm_4d22e7
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %27 = OpLabel
- %28 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %28
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %31 = OpLabel
- %32 = OpFunctionCall %void %pack4x8snorm_4d22e7
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %34 = OpLabel
- %35 = OpFunctionCall %void %pack4x8snorm_4d22e7
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl
index b83a2e3..965c4ba 100644
--- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl
@@ -1,5 +1,5 @@
fn pack4x8snorm_4d22e7() {
- var arg_0 = vec4<f32>();
+ var arg_0 = vec4<f32>(1.0f);
var res : u32 = pack4x8snorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl
index e4f84c6..bef2623 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl
@@ -23,7 +23,7 @@
// fn pack4x8unorm(vec4<f32>) -> u32
fn pack4x8unorm_95c456() {
- var arg_0 = vec4<f32>();
+ var arg_0 = vec4<f32>(1.f);
var res: u32 = pack4x8unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl
index 80d63c9..4577820 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl
@@ -4,7 +4,7 @@
}
void pack4x8unorm_95c456() {
- float4 arg_0 = (0.0f).xxxx;
+ float4 arg_0 = (1.0f).xxxx;
uint res = tint_pack4x8unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl
index 80d63c9..4577820 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl
@@ -4,7 +4,7 @@
}
void pack4x8unorm_95c456() {
- float4 arg_0 = (0.0f).xxxx;
+ float4 arg_0 = (1.0f).xxxx;
uint res = tint_pack4x8unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl
index 8e9eb90..80a0b9b 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl
@@ -1,7 +1,7 @@
#version 310 es
void pack4x8unorm_95c456() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packUnorm4x8(arg_0);
}
@@ -22,7 +22,7 @@
precision mediump float;
void pack4x8unorm_95c456() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packUnorm4x8(arg_0);
}
@@ -37,7 +37,7 @@
#version 310 es
void pack4x8unorm_95c456() {
- vec4 arg_0 = vec4(0.0f);
+ vec4 arg_0 = vec4(1.0f);
uint res = packUnorm4x8(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl
index faab6f2..acba42a 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void pack4x8unorm_95c456() {
- float4 arg_0 = float4(0.0f);
+ float4 arg_0 = float4(1.0f);
uint res = pack_float_to_unorm4x8(arg_0);
}
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm
index cc7d9ea..f064de4 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm
@@ -1,10 +1,10 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 36
+; Bound: 37
; Schema: 0
OpCapability Shader
- %17 = OpExtInstImport "GLSL.std.450"
+ %19 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
OpEntryPoint Fragment %fragment_main "fragment_main"
@@ -32,41 +32,42 @@
%vertex_point_size = OpVariable %_ptr_Output_float Output %8
%void = OpTypeVoid
%9 = OpTypeFunction %void
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
- %21 = OpConstantNull %uint
- %22 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %23 = OpConstantNull %uint
+ %24 = OpTypeFunction %v4float
%pack4x8unorm_95c456 = OpFunction %void None %9
%12 = OpLabel
%arg_0 = OpVariable %_ptr_Function_v4float Function %5
- %res = OpVariable %_ptr_Function_uint Function %21
- OpStore %arg_0 %5
- %18 = OpLoad %v4float %arg_0
- %15 = OpExtInst %uint %17 PackUnorm4x8 %18
- OpStore %res %15
+ %res = OpVariable %_ptr_Function_uint Function %23
+ OpStore %arg_0 %14
+ %20 = OpLoad %v4float %arg_0
+ %17 = OpExtInst %uint %19 PackUnorm4x8 %20
+ OpStore %res %17
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
- %24 = OpLabel
- %25 = OpFunctionCall %void %pack4x8unorm_95c456
+%vertex_main_inner = OpFunction %v4float None %24
+ %26 = OpLabel
+ %27 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %9
- %27 = OpLabel
- %28 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %28
+ %29 = OpLabel
+ %30 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %30
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %9
- %31 = OpLabel
- %32 = OpFunctionCall %void %pack4x8unorm_95c456
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %9
- %34 = OpLabel
- %35 = OpFunctionCall %void %pack4x8unorm_95c456
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl
index 195c952..653c338 100644
--- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl
@@ -1,5 +1,5 @@
fn pack4x8unorm_95c456() {
- var arg_0 = vec4<f32>();
+ var arg_0 = vec4<f32>(1.0f);
var res : u32 = pack4x8unorm(arg_0);
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
index 472ed0e..cf83de4 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
fn textureGather_0166ec() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
index d0981dd..d60956f 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_0166ec() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
index d0981dd..d60956f 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_0166ec() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
index 0968a8e..ec7e934 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
index c58d5a4..fee24ff 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
index d5f7045..23ec392 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%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
+ %37 = OpConstantNull %v4int
+ %38 = OpTypeFunction %v4float
%textureGather_0166ec = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %35
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_3
- %24 = OpImageGather %v4int %29 %30 %uint_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %37
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %uint_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureGather_0166ec
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_0166ec
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %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 %16
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_0166ec
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_0166ec
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_0166ec
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_0166ec
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
index fca6c70..d268bb8 100644
--- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_0166ec() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
index e7aeacf..fa77c24 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
fn textureGather_04fa78() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
index 9297a9c..4afd573 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_04fa78() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
index 9297a9c..4afd573 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_04fa78() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
index 4a1a248..3deccdb 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
index e3140b5..746c891 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,58 +47,59 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %44 = OpConstantNull %v4int
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpConstantNull %v4int
+ %47 = OpTypeFunction %v4float
%textureGather_04fa78 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %44
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %46
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %uint_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %uint_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_04fa78
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_04fa78
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_04fa78
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_04fa78
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_04fa78
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_04fa78
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
index de2c50b..39758e3 100644
--- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_04fa78() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl
index 49612c6..05dff14 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl
@@ -25,7 +25,7 @@
// fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_10c554() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl
index eab2277..1e4265c 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_10c554() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Gather(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl
index eab2277..1e4265c 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_10c554() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Gather(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl
index e6f2add..2a84b78 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
@@ -26,7 +26,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
@@ -43,7 +43,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl
index 16595bd..5c6e114 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm
index 76b2553..ccd308b 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/10c554.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v3float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_10c554 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- %24 = OpLoad %14 %arg_1
- %25 = OpLoad %11 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v3float %arg_2
- %23 = OpImageGather %v4float %27 %28 %int_0
- OpStore %res %23
+ OpStore %arg_2 %21
+ %26 = OpLoad %14 %arg_1
+ %27 = OpLoad %11 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_2
+ %25 = OpImageGather %v4float %29 %30 %int_0
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_10c554
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_10c554
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_10c554
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_10c554
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_10c554
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_10c554
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl
index 4df84e8..ae368d7 100644
--- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_10c554() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
index 65736b0..fb0c520 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_11b2db() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
index 5638aaa..1c983e7 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_11b2db() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
index 5638aaa..1c983e7 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_11b2db() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
index dc0f613..317ebf1 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
index d99c749..7f10956 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
index 0e70b08..a59ac56 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v3float
+ %28 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_11b2db = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v3float %arg_3
- %23 = OpImageGather %v4float %27 %28 %uint_1
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %uint_1
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_11b2db
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_11b2db
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_11b2db
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_11b2db
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_11b2db
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_11b2db
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
index 90c1647..08e6fb4 100644
--- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_11b2db() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
index d717bcc..14e25b3 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
fn textureGather_17baac() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
index 9002334..72fd55e 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_17baac() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
index 9002334..72fd55e 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_17baac() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
index 3b1b280..4887711 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
index 8843160..615bad2 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
index fe20145..0fbb131 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,58 +45,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_17baac = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_17baac
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_17baac
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_17baac
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_17baac
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_17baac
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_17baac
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
index 349edb2..9f0f4d8 100644
--- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_17baac() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
index a58858c..a705c58 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
fn textureGather_1bf0ab() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
index 4f5b1e3..0fb129e 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_1bf0ab() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
index 4f5b1e3..0fb129e 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_1bf0ab() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
index e7f08f3..4e5727e 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
index 5040fe0..7d8e52e 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
index 44eaae6..58681a8 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,57 +46,58 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %43 = OpConstantNull %v4uint
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpConstantNull %v4uint
+ %46 = OpTypeFunction %v4float
%textureGather_1bf0ab = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %43
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %45
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %uint_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_1bf0ab
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_1bf0ab
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_1bf0ab
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_1bf0ab
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_1bf0ab
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_1bf0ab
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
index 75e5f39..d9a878d 100644
--- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_1bf0ab() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl
index b88af9a..1b44370 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl
@@ -25,8 +25,8 @@
// fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_1f7f6b() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.f);
+ const arg_3 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl
index 36412fa..e305a42 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_1f7f6b() {
- float2 arg_2 = (0.0f).xx;
- float4 res = arg_0.Gather(arg_1, arg_2, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float4 res = arg_0.Gather(arg_1, arg_2, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl
index 36412fa..e305a42 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_1f7f6b() {
- float2 arg_2 = (0.0f).xx;
- float4 res = arg_0.Gather(arg_1, arg_2, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float4 res = arg_0.Gather(arg_1, arg_2, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl
index 1516248..ecf2cdb 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() {
- vec2 arg_2 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1));
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() {
- vec2 arg_2 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1));
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() {
- vec2 arg_2 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl
index 5219d4f..ebfd105 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_1f7f6b(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, int2(0));
+ float2 arg_2 = float2(1.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm
index d32d052..a591867 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 49
+; Bound: 51
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,48 +44,50 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2
- %32 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %35 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %38 = OpTypeFunction %v4float
%textureGather_1f7f6b = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- %24 = OpLoad %14 %arg_1
- %25 = OpLoad %11 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_2
- %23 = OpImageGather %v4float %27 %28 %int_0 ConstOffset %32
- OpStore %res %23
+ OpStore %arg_2 %21
+ %26 = OpLoad %14 %arg_1
+ %27 = OpLoad %11 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_2
+ %25 = OpImageGather %v4float %29 %30 %int_0 ConstOffset %35
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_1f7f6b
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_1f7f6b
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
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureGather_1f7f6b
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_1f7f6b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_1f7f6b
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_1f7f6b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl
index 806fc3e..a44f565 100644
--- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl
@@ -3,8 +3,8 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_1f7f6b() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.0f);
+ const arg_3 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl
index 0128b0e..507c665 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
fn textureGather_22e930() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl
index 7aa31c9..945645e 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_22e930() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl
index 7aa31c9..945645e 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_22e930() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl
index af84133..618b4d8 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl
index d6b3f74..f24c163 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm
index dce3fe0..80bd120 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,56 +45,57 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %44 = OpTypeFunction %v4float
%textureGather_22e930 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureGather_22e930
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_22e930
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureGather_22e930
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_22e930
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_22e930
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_22e930
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl
index f26e58c..e35eec4 100644
--- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_22e930() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
index 44f52d8..2e4fcc6 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
index e49c257..51aa04d 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_238ec4() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
index e49c257..51aa04d 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_238ec4() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
index 680cf42..e7fb956 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_238ec4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_238ec4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_238ec4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
index eeeca6f..51590a7 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_238ec4(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
index 16698c1..6eca3ae 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,59 +45,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %42 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %45 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureGather_238ec4 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1 ConstOffset %45
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_238ec4
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_238ec4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_238ec4
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_238ec4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_238ec4
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_238ec4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
index 1e41345..bc1135b 100644
--- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_238ec4() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl
index ec58dac..d6a5989 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
fn textureGather_24b0bd() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl
index cd9fc73..832e6ef 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_24b0bd() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl
index cd9fc73..832e6ef 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_24b0bd() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl
index 9bb3522..a1159f2 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_24b0bd() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_24b0bd() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_24b0bd() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl
index 399253a..831c736 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm
index afb0711..98ce9c6 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,58 +45,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_24b0bd = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_24b0bd
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_24b0bd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_24b0bd
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_24b0bd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_24b0bd
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_24b0bd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl
index 55a88fe..84b2988 100644
--- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_24b0bd() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl
index 8297c39..ffaca0e 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
fn textureGather_269250() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
index 6559297..fc18377 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_269250() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
index 6559297..fc18377 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_269250() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
index f3f577a..bf6833a 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_269250() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_269250() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_269250() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
index 1e8f39c..6c96964 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
index 36bdfab..030eb45 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,58 +46,59 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %44 = OpConstantNull %v4int
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpConstantNull %v4int
+ %47 = OpTypeFunction %v4float
%textureGather_269250 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %44
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %46
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %uint_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %uint_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_269250
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_269250
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_269250
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_269250
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_269250
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_269250
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
index e2c82c1..c6d0fba 100644
--- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_269250() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
index c2be9ee..13c07d5 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
index 1b3539d..14b7917 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_2a4f40() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
index 1b3539d..14b7917 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_2a4f40() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
index bdf959d..347d5d8 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_2a4f40() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_2a4f40() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_2a4f40() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
index e29dd88..2dab350 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
index f21c774..fcbc8b3 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,58 +45,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_2a4f40 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_2
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_3
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_2a4f40
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_2a4f40
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_2a4f40
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_2a4f40
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_2a4f40
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_2a4f40
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
index 2b827fd..e86a396 100644
--- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_2a4f40() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl
index 997c0ad..c423d01 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
fn textureGather_2cc066() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl
index 3d64cb3..9f48ff9 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_2cc066() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl
index 3d64cb3..9f48ff9 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_2cc066() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl
index 42cedd1..416f378 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_2cc066() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_2cc066() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_2cc066() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl
index 1788324..0d34a69 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm
index ba22c06..cbc4abe 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,58 +46,59 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %44 = OpConstantNull %v4uint
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpConstantNull %v4uint
+ %47 = OpTypeFunction %v4float
%textureGather_2cc066 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %44
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %46
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %int_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %int_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_2cc066
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_2cc066
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_2cc066
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_2cc066
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_2cc066
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_2cc066
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl
index 14d6c50..456b2e8 100644
--- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_2cc066() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl
index 0d14aa3..eef9c5a 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl
@@ -25,7 +25,7 @@
// fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather_2e0ed5() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl
index 995319a..2697be0 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_2e0ed5() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = arg_0.Gather(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl
index 995319a..2697be0 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_2e0ed5() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = arg_0.Gather(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl
index 56056ae..87da032 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_2e0ed5() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
@@ -26,7 +26,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_2e0ed5() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
@@ -43,7 +43,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_2e0ed5() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl
index 0fafcf7..dc3340b 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm
index c33a890..77916f4 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_2e0ed5 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- %24 = OpLoad %14 %arg_1
- %25 = OpLoad %11 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_2
- %23 = OpImageGather %v4float %27 %28 %int_0
- OpStore %res %23
+ OpStore %arg_2 %21
+ %26 = OpLoad %14 %arg_1
+ %27 = OpLoad %11 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_2
+ %25 = OpImageGather %v4float %29 %30 %int_0
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_2e0ed5
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_2e0ed5
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_2e0ed5
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_2e0ed5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_2e0ed5
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_2e0ed5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl
index b5d2415..989f3b1 100644
--- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_2e0ed5() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl
index 8819419..467daed 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_32c4e8() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl
index 6843bb1..d7e7106 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_32c4e8() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl
index 6843bb1..d7e7106 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_32c4e8() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl
index aa2ae80..65a395e 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_32c4e8() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_32c4e8() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp samplerCube arg_1_arg_2;
void textureGather_32c4e8() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl
index 6bcc6d7..384b43d 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm
index af17d81..0679310 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v3float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_32c4e8 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v3float %arg_3
- %23 = OpImageGather %v4float %27 %28 %int_1
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %int_1
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_32c4e8
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_32c4e8
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_32c4e8
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_32c4e8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_32c4e8
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_32c4e8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl
index e93f80c..94a628c 100644
--- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_32c4e8() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl
index 52a131e..9ca8ec5 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
fn textureGather_3b32cc() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl
index 2845979..eaf9419 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_3b32cc() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl
index 2845979..eaf9419 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_3b32cc() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl
index 12cba16..29a4970 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_3b32cc() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_3b32cc() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_3b32cc() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl
index f1dfbe5..e50181c 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm
index 2a29791..98c22b4 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%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
+ %37 = OpConstantNull %v4uint
+ %38 = OpTypeFunction %v4float
%textureGather_3b32cc = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %35
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %int_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %37
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %int_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureGather_3b32cc
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_3b32cc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %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 %16
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_3b32cc
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_3b32cc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_3b32cc
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_3b32cc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl
index a7963b2..8a0e075 100644
--- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_3b32cc() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl
index ccd65bd..1eac371 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl
index 95e4023..1284613 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_43025d() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl
index 95e4023..1284613 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_43025d() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl
index ed0f44a..a5c8616 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm
index 50439ce..3e8b0a4 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,57 +46,58 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %43 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpTypeFunction %v4float
%textureGather_43025d = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_2
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %int %arg_3
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_2
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %int %arg_3
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_43025d
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_43025d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureGather_43025d
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_43025d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_43025d
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_43025d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl
index 12337c7..b693dd2 100644
--- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_43025d() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl
index e67711f..92c5d40 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
fn textureGather_445793() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl
index 0d4c5a3..38175e3 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_445793() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl
index 0d4c5a3..38175e3 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_445793() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl
index 0528a0a..6b372ac 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_445793() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_445793() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_445793() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl
index c77189e..a3d869a 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm
index 62dbbf4..6b025b8 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,59 +46,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %45 = OpConstantNull %v4int
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4int
+ %48 = OpTypeFunction %v4float
%textureGather_445793 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %uint_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_445793
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_445793
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_445793
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_445793
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_445793
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_445793
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl
index 60c03e6..7ddaed0 100644
--- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_445793() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl
index 09fe4aa..b5a1bd2 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
fn textureGather_49b07f() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl
index 42046f3..97cef51 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_49b07f() {
- float2 arg_3 = (0.0f).xx;
- uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl
index 42046f3..97cef51 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_49b07f() {
- float2 arg_3 = (0.0f).xx;
- uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl
index e576f45..f16d38b 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_49b07f() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_49b07f() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_49b07f() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl
index b83245e..554eaa6 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_49b07f(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm
index bc3d0f9..7558727 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,50 +45,51 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %34 = OpConstantNull %v2int
+ %36 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %37 = OpConstantNull %v4uint
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpConstantNull %v4uint
+ %40 = OpTypeFunction %v4float
%textureGather_49b07f = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %37
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %int_1 ConstOffset %34
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %39
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %int_1 ConstOffset %36
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureGather_49b07f
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGather_49b07f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_49b07f
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_49b07f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_49b07f
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_49b07f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl
index bba9c02..8704bc1 100644
--- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_49b07f() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl
index f49a5eb..9f76bb5 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl
index 5016110..5011165 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_4b8103() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl
index 5016110..5011165 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_4b8103() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl
index 186aab2..1edafe5 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_4b8103() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_4b8103() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_4b8103() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl
index 2c3b8cd..ebc75ff 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_4b8103(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm
index 6b14a08..31b230e 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,58 +45,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %41 = OpConstantNull %v2int
+ %43 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_4b8103 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1 ConstOffset %41
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1 ConstOffset %43
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_4b8103
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_4b8103
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_4b8103
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_4b8103
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_4b8103
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_4b8103
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl
index d7bba31..2e80b1a 100644
--- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_4b8103() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
index 76f0a70..b9ca9f7 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<i32>
fn textureGather_4e8ac5() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
index b7cd247..4a2c242 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_4e8ac5() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
index b7cd247..4a2c242 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_4e8ac5() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
index 20d7c66..eaecf15 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_4e8ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_4e8ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_4e8ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
index da3939b..bf7d3ab 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
index fe9d0d4..4748563 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,59 +46,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int_1 = OpConstant %int 1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %45 = OpConstantNull %v4int
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4int
+ %48 = OpTypeFunction %v4float
%textureGather_4e8ac5 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %int_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %int_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_4e8ac5
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_4e8ac5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_4e8ac5
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_4e8ac5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_4e8ac5
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_4e8ac5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
index e1ccdbf8..742d85e 100644
--- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_4e8ac5() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl
index 29584a3..70b0b57 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather_5266da() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl
index f449a19..a7dba3d 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5266da() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl
index f449a19..a7dba3d 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5266da() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl
index 33c4c0f..4aa9d51 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_5266da() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_5266da() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_5266da() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl
index 09bd3bb..71f3134 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm
index b1bb4b9..3281e7b 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/5266da.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_5266da = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_3
- %23 = OpImageGather %v4float %27 %28 %int_1
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %int_1
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_5266da
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_5266da
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_5266da
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_5266da
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_5266da
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_5266da
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl
index b3469f7..5d30699 100644
--- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_5266da() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
index e490508..ea37944 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
index 9e2af14..1843c50 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_59372a() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
index 9e2af14..1843c50 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_59372a() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
index d0c0e51..a0cd1ad 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_59372a() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_59372a() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_59372a() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
index 2299af0..ac817ac 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_59372a(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
index 159651c..502415e 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,60 +45,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %45 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureGather_59372a = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1 ConstOffset %43
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1 ConstOffset %45
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_59372a
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_59372a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_59372a
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_59372a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_59372a
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_59372a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
index fec8fe9..ffe7a1b 100644
--- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_59372a() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl
index 37ad80a..f1b04a0 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
fn textureGather_5ba85f() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl
index 39a0d15..f6d0388 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5ba85f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl
index 39a0d15..f6d0388 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5ba85f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl
index 096f596..936cbd1 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_5ba85f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_5ba85f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp isamplerCube arg_1_arg_2;
void textureGather_5ba85f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl
index 23a45a4..1918822 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm
index 30b40eb..6ad4fe9 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.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
@@ -45,47 +45,48 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int_1 = OpConstant %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_5ba85f = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %34
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_3
- %24 = OpImageGather %v4int %29 %30 %int_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %36
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %int_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_5ba85f
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_5ba85f
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_5ba85f
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_5ba85f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_5ba85f
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_5ba85f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl
index d2a3918..bd36329 100644
--- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_5ba85f() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl
index 1e5c68f..ab1dd80 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
fn textureGather_5bd491() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl
index 50701a2..4027ec0 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5bd491() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl
index 50701a2..4027ec0 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_5bd491() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl
index 1cb6b09..8b8939d 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_5bd491() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_5bd491() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_5bd491() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl
index 22227a8..ba70f35 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm
index 601e988..93c18ed 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%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
+ %37 = OpConstantNull %v4uint
+ %38 = OpTypeFunction %v4float
%textureGather_5bd491 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %35
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %int_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %37
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %int_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureGather_5bd491
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_5bd491
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %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 %16
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_5bd491
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_5bd491
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_5bd491
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_5bd491
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl
index 835c7ab..64bee25 100644
--- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_5bd491() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
index b47e75e..93046b9 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
index 691fd8d..483b16f 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_6b7b74() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
index 691fd8d..483b16f 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_6b7b74() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
index bb9053c..cc2e9b5 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_6b7b74() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_6b7b74() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_6b7b74() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
index 188a667..584583c 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_6b7b74(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
index dcb03e7..6794f05 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %46 = OpConstantNull %v4uint
- %47 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4uint
+ %50 = OpTypeFunction %v4float
%textureGather_6b7b74 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %46
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %uint_1 ConstOffset %46
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %47
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureGather_6b7b74
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_6b7b74
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %52 = OpLabel
- %53 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %53
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_6b7b74
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_6b7b74
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureGather_6b7b74
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_6b7b74
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
index 62867d7..ab4d5c8 100644
--- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_6b7b74() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl
index 304233a..0459084 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
fn textureGather_751f8a() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl
index 4b0055f..4861cca 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_751f8a() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl
index 4b0055f..4861cca 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_751f8a() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl
index 4b8c748..8e00dce 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm
index d65968a..9792c25 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,56 +46,57 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %44 = OpTypeFunction %v4float
%textureGather_751f8a = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_3
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureGather_751f8a
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_751f8a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureGather_751f8a
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_751f8a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_751f8a
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_751f8a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl
index 6d844cc..827faaf 100644
--- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_751f8a() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl
index b78bd39..77f5724 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
fn textureGather_788010() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
index 130a99e..098bc2a 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_788010() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
index 130a99e..098bc2a 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_788010() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
index 2c80712..5968236 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
index 7e9ec26..d4b6a12 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,59 +47,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%int_1 = OpConstant %int 1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %45 = OpConstantNull %v4int
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4int
+ %48 = OpTypeFunction %v4float
%textureGather_788010 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %int_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %int_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_788010
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_788010
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_788010
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_788010
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_788010
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_788010
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
index 3f426c4..52ad4c6 100644
--- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_788010() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl
index 1399be9..4e18be0 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
fn textureGather_7c3828() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl
index af880b4..ffe464d 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_7c3828() {
- float2 arg_3 = (0.0f).xx;
- int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl
index af880b4..ffe464d 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_7c3828() {
- float2 arg_3 = (0.0f).xx;
- int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl
index 862ebb4..c1d56be 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_7c3828() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_7c3828() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_7c3828() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl
index 9772d44..9c4e568 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_7c3828(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm
index 18f210e..b704f03 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 51
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,49 +45,50 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %33 = OpConstantNull %v2int
+ %35 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %36 = OpConstantNull %v4int
- %37 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %38 = OpConstantNull %v4int
+ %39 = OpTypeFunction %v4float
%textureGather_7c3828 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %36
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4int %29 %30 %int_1 ConstOffset %33
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %38
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %int_1 ConstOffset %35
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %37
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureGather_7c3828
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_7c3828
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %42 = OpLabel
- %43 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %43
+ %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
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_7c3828
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_7c3828
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureGather_7c3828
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_7c3828
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl
index 70760c9..f5e18b3 100644
--- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_7c3828() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
index b781710..816965a 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
index 13f7566..54411be 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_7dd226() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
index 13f7566..54411be 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_7dd226() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
index 1c7b39b..c0b2d12 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
index dc42b14..d10d883 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,58 +46,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_7dd226 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_2
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %uint %arg_3
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_2
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_7dd226
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_7dd226
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_7dd226
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_7dd226
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_7dd226
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_7dd226
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
index 0e0eb90..1b1c20d 100644
--- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_7dd226() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl
index 1134019..dabcb5b 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
fn textureGather_829357() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
index 77abe9b..88ad7f2 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_829357() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
index 77abe9b..88ad7f2 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_829357() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
index 89c6bfb..655411d 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
index 1427357e..ef7e6f1 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,58 +46,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_829357 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_3
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_829357
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_829357
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_829357
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_829357
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_829357
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_829357
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
index 78f4e36..bd4c6ca 100644
--- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_829357() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl
index 1f3118d..28ca6b3 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl
index 38bf7e0..2e103a4 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_831549() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl
index 38bf7e0..2e103a4 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_831549() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl
index 88bf13e..b10b9e1 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_831549() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_831549() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_831549() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl
index f6e10eb..d2fade6 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_831549(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm
index 6ac5d59..50095f7 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,60 +45,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %45 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureGather_831549 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %43
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1 ConstOffset %45
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_831549
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_831549
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_831549
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_831549
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_831549
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_831549
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl
index fb01440..030f293 100644
--- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_831549() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
index 44ac499..2008876 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<f32>
fn textureGather_8578bc() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
index 58ad0bd..422ee44 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8578bc() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
index 58ad0bd..422ee44 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8578bc() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
index e802a9c..ec01ea8 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
index 2c1c930..b762315 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,56 +46,57 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %44 = OpTypeFunction %v4float
%textureGather_8578bc = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_3
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureGather_8578bc
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_8578bc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureGather_8578bc
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_8578bc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_8578bc
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_8578bc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
index 9a4dd4c..069acaf 100644
--- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_8578bc() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
index c94c858..494bd1b 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube<u32>, sampler: sampler, coords: vec3<f32>) -> vec4<u32>
fn textureGather_89680f() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
index a6d386c..c3e709a 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_89680f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
index a6d386c..c3e709a 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_89680f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
index 6f98fe0..67bb598 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_89680f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_89680f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp usamplerCube arg_1_arg_2;
void textureGather_89680f() {
- vec3 arg_3 = vec3(0.0f);
+ vec3 arg_3 = vec3(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
index e71f745..3668516 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
index 700a3d0..8b47c7d 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/89680f.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
@@ -45,47 +45,48 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%uint_1 = OpConstant %uint 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_89680f = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %34
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %uint_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %36
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %uint_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_89680f
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_89680f
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_89680f
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_89680f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_89680f
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_89680f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
index 47f8180..63c1ad0 100644
--- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_89680f() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl
index 6fe4a5e..32c4e98 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<i32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<i32>
fn textureGather_8b754c() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl
index 52dcf0f..c0256e6 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8b754c() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl
index 52dcf0f..c0256e6 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8b754c() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl
index b7a690a..19a3f9f 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_8b754c() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_8b754c() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_8b754c() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl
index 171f733..9ac6634 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm
index 09b943b..2ffe76a 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,57 +46,58 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %43 = OpConstantNull %v4int
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpConstantNull %v4int
+ %46 = OpTypeFunction %v4float
%textureGather_8b754c = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %43
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %45
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %int_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_8b754c
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_8b754c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_8b754c
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_8b754c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_8b754c
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_8b754c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl
index bc214eb..a997540 100644
--- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_8b754c() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
index 0821f74..e78eabd 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>) -> vec4<u32>
fn textureGather_8fae00() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
index 4f75e29..3e180aa 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8fae00() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
index 4f75e29..3e180aa 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_8fae00() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
index f787c2e..199a442 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_8fae00() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_8fae00() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_8fae00() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
index 55b262f..21e063a 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
index 1739fb4..90e3391 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.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
@@ -45,47 +45,48 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%uint_1 = OpConstant %uint 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_8fae00 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %34
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %uint_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %36
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %uint_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_8fae00
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_8fae00
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_8fae00
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_8fae00
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_8fae00
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_8fae00
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
index 69490b4..f661061 100644
--- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_8fae00() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl
index eea4da2..9eed5cb 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<u32>
fn textureGather_92ea47() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl
index caaf8b4..e90476d 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_92ea47() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl
index caaf8b4..e90476d 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_92ea47() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl
index 6004232..fa764dd 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_92ea47() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_92ea47() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_92ea47() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl
index b733157..17a6210 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm
index 150621f..72535f4 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,59 +46,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %45 = OpConstantNull %v4uint
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4uint
+ %48 = OpTypeFunction %v4float
%textureGather_92ea47 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %uint_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %uint_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_92ea47
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_92ea47
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_92ea47
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_92ea47
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_92ea47
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_92ea47
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl
index c528d46..435dfab 100644
--- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_92ea47() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl
index 86df23b..7e468be 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: u32, texture: texture_2d<u32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<u32>
fn textureGather_986700() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
index 740ed2b..ec8491d 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_986700() {
- float2 arg_3 = (0.0f).xx;
- uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
index 740ed2b..ec8491d 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_986700() {
- float2 arg_3 = (0.0f).xx;
- uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
index 10921e5..b305559 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_986700() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_986700() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp usampler2D arg_1_arg_2;
void textureGather_986700() {
- vec2 arg_3 = vec2(0.0f);
- uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
index 024eebb..0b9c5e1 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_986700(texture2d<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
index cca05f3..a2f647e 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,50 +45,52 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4uint = OpTypeVector %uint 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%uint_1 = OpConstant %uint 1
%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_v4uint = OpTypePointer Function %v4uint
- %37 = OpConstantNull %v4uint
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %40 = OpConstantNull %v4uint
+ %41 = OpTypeFunction %v4float
%textureGather_986700 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4uint Function %37
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4uint %29 %30 %uint_1 ConstOffset %34
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %40
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4uint %31 %32 %uint_1 ConstOffset %37
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureGather_986700
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_986700
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_986700
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_986700
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_986700
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_986700
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
index eb8526e..f9aa332 100644
--- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_986700() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl
index 48f44fa..a2209d5 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl
index 00950b5..5d3990e 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_9a6358() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl
index 00950b5..5d3990e 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_9a6358() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl
index f535b11..1f7d85f 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_9a6358() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_9a6358() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_9a6358() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl
index 0b4f909..82bd613 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm
index 96ae32c..fac5ae5 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,57 +45,58 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %43 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpTypeFunction %v4float
%textureGather_9a6358 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_2
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_3
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_3
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_9a6358
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_9a6358
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureGather_9a6358
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGather_9a6358
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_9a6358
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_9a6358
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl
index 7d85b1b..934aa85 100644
--- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_9a6358() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl
index ea1369d..2d5a787 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl
index 898324f..4c172c5 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_9ab41e() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl
index 898324f..4c172c5 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_9ab41e() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl
index 4dfab19..6035dda 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_9ab41e() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_9ab41e() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_9ab41e() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl
index 70bf095..cf0143c 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_9ab41e(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm
index b3b751b..5bd290e 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%v2int = OpTypeVector %int 2
- %44 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %47 = OpConstantNull %v4int
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4int
+ %50 = OpTypeFunction %v4float
%textureGather_9ab41e = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %47
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %uint_1 ConstOffset %44
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %uint_1 ConstOffset %46
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_9ab41e
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_9ab41e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_9ab41e
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_9ab41e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureGather_9ab41e
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_9ab41e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl
index 8a0dad6..5dba028 100644
--- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_9ab41e() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
index d6aedba..62f713b 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
fn textureGather_a0372b() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
index fb8e7d5..d55d5b2 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_a0372b() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
index fb8e7d5..d55d5b2 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_a0372b() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
index c901057..937464c 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_a0372b() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -27,7 +27,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_a0372b() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
@@ -45,7 +45,7 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_a0372b() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
index 7a6f23d..6b012ed 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
index d884cab..36d6547 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,59 +46,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %45 = OpConstantNull %v4uint
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4uint
+ %48 = OpTypeFunction %v4float
%textureGather_a0372b = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %int_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_a0372b
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_a0372b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_a0372b
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_a0372b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_a0372b
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_a0372b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
index 2daaad7..e4b97a2 100644
--- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_a0372b() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
index f58770c6..d18ba4f 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl
@@ -25,9 +25,9 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
index 97ae67b..d716bd5 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_a68027() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
index 97ae67b..d716bd5 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_a68027() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
index 24ac721..685e54f 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_a68027() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_a68027() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_a68027() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
index 6584b67..1e36abd 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_a68027(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0));
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
index a0830ea..6fe0fae 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,60 +45,62 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpTypeFunction %v4float
%textureGather_a68027 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_2
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_3
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %43
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_3
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0 ConstOffset %46
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_a68027
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_a68027
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_a68027
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_a68027
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_a68027
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureGather_a68027
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
index f7aa73b..7806795 100644
--- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_a68027() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl
index 640fa29..4e511c9 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32>
fn textureGather_aaf6bd() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl
index ff59e82..c9ad432 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_aaf6bd() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl
index ff59e82..c9ad432 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_aaf6bd() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl
index 51280df..4a1771a 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm
index b4296f0..b02612c 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,59 +47,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %45 = OpConstantNull %v4int
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4int
+ %48 = OpTypeFunction %v4float
%textureGather_aaf6bd = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %37 = OpCompositeExtract %float %34 2
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %uint_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_aaf6bd
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_aaf6bd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_aaf6bd
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_aaf6bd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_aaf6bd
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_aaf6bd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl
index 957219f..7515732 100644
--- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_aaf6bd() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl
index fe08084..0a0d4e0 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: i32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_af55b3() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl
index 2cf56d1..004bf3e 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_af55b3() {
- float2 arg_3 = (0.0f).xx;
- float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl
index 2cf56d1..004bf3e 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_af55b3() {
- float2 arg_3 = (0.0f).xx;
- float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl
index ec46313..f487bf8 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_af55b3() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_af55b3() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_af55b3() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1);
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl
index 5bdf570..c60b757 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_af55b3(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm
index 7bb9edc..1cf4833 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.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,48 +44,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %32 = OpConstantNull %v2int
+ %34 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %37 = OpTypeFunction %v4float
%textureGather_af55b3 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_3
- %23 = OpImageGather %v4float %27 %28 %int_1 ConstOffset %32
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %int_1 ConstOffset %34
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_af55b3
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_af55b3
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 %textureGather_af55b3
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_af55b3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_af55b3
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_af55b3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl
index 027213b..ece4d49 100644
--- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_af55b3() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl
index 1d90408..4cdc946 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
fn textureGather_bb3ac5() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl
index 2f718f3..bf01188 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_bb3ac5() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl
index 2f718f3..bf01188 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_bb3ac5() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl
index 0c9b449..eac794a 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_bb3ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -26,7 +26,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_bb3ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
@@ -43,7 +43,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_bb3ac5() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, 1);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl
index 99c8768..4fc6aef 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm
index 0d15df0..a9d8e0d 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.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
@@ -45,47 +45,48 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int_1 = OpConstant %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_bb3ac5 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %34
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4int %29 %30 %int_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %36
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %int_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGather_bb3ac5
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureGather_bb3ac5
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_bb3ac5
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureGather_bb3ac5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_bb3ac5
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_bb3ac5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl
index 495e907..790a316 100644
--- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_bb3ac5() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
index 12963b5..c401a2d 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
index dd45876..cc7da20 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_bd33b6() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
index dd45876..cc7da20 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_bd33b6() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
index 7afb7c6..e8a0d0f 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_bd33b6() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_bd33b6() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_bd33b6() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
index 7453f31..becd9cb 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_bd33b6(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
index 53a9d99..985c152 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %44 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %47 = OpConstantNull %v4int
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4int
+ %50 = OpTypeFunction %v4float
%textureGather_bd33b6 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %47
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %int_1 ConstOffset %44
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %int_1 ConstOffset %46
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_bd33b6
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_bd33b6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_bd33b6
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_bd33b6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureGather_bd33b6
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_bd33b6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
index e0a3f4d..9e313ac 100644
--- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_bd33b6() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
index 9823061..c370be7 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
fn textureGather_be276f() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
index 076da2b..a14fbfd 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_be276f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
index 076da2b..a14fbfd 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_be276f() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
index 537029e..0642518 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
index 10fb0ee..e16c672 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,59 +47,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %45 = OpConstantNull %v4uint
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4uint
+ %48 = OpTypeFunction %v4float
%textureGather_be276f = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %37 = OpCompositeExtract %float %34 2
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %int_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_be276f
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_be276f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_be276f
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_be276f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_be276f
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_be276f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
index ba4234a..91f83dd 100644
--- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_be276f() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl
index 4cf7792..4c2d2b2 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<i32>
fn textureGather_c0640c() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl
index 76b208b..74d182b 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_c0640c() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl
index 76b208b..74d182b 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_c0640c() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl
index 9e5a33b..4514dbc 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm
index 1a0206b..a404b03 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,57 +47,58 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %43 = OpConstantNull %v4int
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpConstantNull %v4int
+ %46 = OpTypeFunction %v4float
%textureGather_c0640c = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %43
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %45
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %37 = OpCompositeExtract %float %34 2
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %int_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %int_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_c0640c
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_c0640c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_c0640c
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_c0640c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_c0640c
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_c0640c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl
index eae1f9a..3372a4d 100644
--- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_c0640c() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
index d841c27..4a66e72 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>) -> vec4<i32>
fn textureGather_ccadde() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
index 1b760a5..48f27de 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ccadde() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
index 1b760a5..48f27de 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ccadde() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
index 5268f1f..d2d56a9 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_ccadde() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_ccadde() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_ccadde() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
index 47a6567..6b81fe0 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
index e8acb0b..55ebe0d 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%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
+ %37 = OpConstantNull %v4int
+ %38 = OpTypeFunction %v4float
%textureGather_ccadde = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %35
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4int %29 %30 %uint_1
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %37
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %uint_1
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureGather_ccadde
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureGather_ccadde
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %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 %16
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_ccadde
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_ccadde
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_ccadde
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_ccadde
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
index 15cdbb4..509edb3 100644
--- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_ccadde() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
index 156d1ec..e2d08b2 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
index 7df33ee..4ab074d 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ce5578() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
index 7df33ee..4ab074d 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ce5578() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
index a7825b7..360f4fb 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_ce5578() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_ce5578() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_ce5578() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
index 14a5c03..b2f8c74 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_ce5578(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
index aec41cc..4bfdca5 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%v2int = OpTypeVector %int 2
- %44 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %47 = OpConstantNull %v4uint
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4uint
+ %50 = OpTypeFunction %v4float
%textureGather_ce5578 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %47
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %int_1 ConstOffset %44
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %int_1 ConstOffset %46
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_ce5578
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_ce5578
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_ce5578
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_ce5578
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureGather_ce5578
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_ce5578
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
index f936734..27f3c1c 100644
--- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_ce5578() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
index bd3e4df..4c0baaf 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
index cefff93..59c08dc 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_cf9112() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
index cefff93..59c08dc 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_cf9112() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
index 60d154e..71a71e0 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_cf9112() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_cf9112() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_cf9112() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
index 0d762a7..36494a4 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_cf9112(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
index 05debe8..488b0e1 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %28 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %46 = OpConstantNull %v4int
- %47 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4int
+ %50 = OpTypeFunction %v4float
%textureGather_cf9112 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %28
- %res = OpVariable %_ptr_Function_v4int Function %46
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_4
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_4
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4int %36 %43 %uint_1 ConstOffset %46
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %47
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureGather_cf9112
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_cf9112
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %52 = OpLabel
- %53 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %53
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_cf9112
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_cf9112
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureGather_cf9112
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_cf9112
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
index ac3035b..2991409 100644
--- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_cf9112() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl
index 81533b2..305f819 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl
index 6fdf9e4..f7f3833 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d1f187() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl
index 6fdf9e4..f7f3833 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d1f187() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl
index cf015a2..2631480 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_d1f187() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_d1f187() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_d1f187() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl
index a2e3383..29eda44 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_d1f187(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm
index f88d541..fece5f4 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %43 = OpConstantNull %v2int
+ %45 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %46 = OpConstantNull %v4uint
- %47 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpConstantNull %v4uint
+ %49 = OpTypeFunction %v4float
%textureGather_d1f187 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %46
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %48
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %int_1 ConstOffset %43
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %int_1 ConstOffset %45
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %47
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureGather_d1f187
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGather_d1f187
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %52 = OpLabel
- %53 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %53
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_d1f187
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_d1f187
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureGather_d1f187
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureGather_d1f187
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl
index c7522da..f005403 100644
--- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_d1f187() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl
index 25afe4a..bd6a182 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
fn textureGather_d4b5c6() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl
index f8af258..1790e9e 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d4b5c6() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl
index f8af258..1790e9e 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d4b5c6() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl
index ad72e15..110ba98 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm
index 33772f0..2e65d3a 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,59 +47,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %45 = OpConstantNull %v4uint
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4uint
+ %48 = OpTypeFunction %v4float
%textureGather_d4b5c6 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %uint_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %uint_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_d4b5c6
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_d4b5c6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_d4b5c6
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_d4b5c6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_d4b5c6
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_d4b5c6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl
index 9b394bb..573afe7 100644
--- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_d4b5c6() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
index 529a2b4..667dc52 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_d6507c() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
index 158dc3c..7075df4 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d6507c() {
- float2 arg_3 = (0.0f).xx;
- float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
index 158dc3c..7075df4 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d6507c() {
- float2 arg_3 = (0.0f).xx;
- float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
index 493bc74..4226409 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d6507c() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d6507c() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d6507c() {
- vec2 arg_3 = vec2(0.0f);
- vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
index 2a6abf0..c9b6de0 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_d6507c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
index 6ea4db6..f73987d 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,49 +44,51 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %33 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %36 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureGather_d6507c = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_3
- %23 = OpImageGather %v4float %27 %28 %uint_1 ConstOffset %33
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %uint_1 ConstOffset %36
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureGather_d6507c
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureGather_d6507c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %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
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_d6507c
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGather_d6507c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_d6507c
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_d6507c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
index 97e61e9..392cf96 100644
--- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_d6507c() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
index c9d9eac8..0908c1f 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureGather_d8e958() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
index 03635a4..9160d0b 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d8e958() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
index 03635a4..9160d0b 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d8e958() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
float4 res = arg_1.GatherGreen(arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
index ec027e7..1cfc5db 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d8e958() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -26,7 +26,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d8e958() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
@@ -43,7 +43,7 @@
uniform highp sampler2D arg_1_arg_2;
void textureGather_d8e958() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
index 0cf129f..463582b 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
index 3800a97..0e48fa2 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.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,46 +44,47 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %26 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %28 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %35 = OpTypeFunction %v4float
%textureGather_d8e958 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
- %24 = OpLoad %14 %arg_2
- %25 = OpLoad %11 %arg_1
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v2float %arg_3
- %23 = OpImageGather %v4float %27 %28 %uint_1
- OpStore %res %23
+ OpStore %arg_3 %21
+ %26 = OpLoad %14 %arg_2
+ %27 = OpLoad %11 %arg_1
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v2float %arg_3
+ %25 = OpImageGather %v4float %29 %30 %uint_1
+ OpStore %res %25
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureGather_d8e958
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureGather_d8e958
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_d8e958
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_d8e958
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureGather_d8e958
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_d8e958
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
index f4776fb..7abc15a 100644
--- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_d8e958() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl
index 5e9106b..4aed3ac 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl
@@ -25,9 +25,9 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl
index 961f7f3..2ea2c41 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_d90605() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl
index 961f7f3..2ea2c41 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureGather_d90605() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl
index 698dd66..f83b545 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_d90605() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_d90605() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGather_d90605() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl
index b5074d2..e27f2f7 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_d90605(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0));
+ float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm
index 2c1da3f..9867556 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,59 +45,60 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2
- %42 = OpConstantNull %v2int
+ %44 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpTypeFunction %v4float
%textureGather_d90605 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %29 = OpLoad %14 %arg_1
- %30 = OpLoad %11 %arg_0
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_2
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %int %arg_3
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %42
- OpStore %res %28
+ %31 = OpLoad %14 %arg_1
+ %32 = OpLoad %11 %arg_0
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_2
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %int %arg_3
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %int_0 ConstOffset %44
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_d90605
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_d90605
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_d90605
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_d90605
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_d90605
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_d90605
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl
index 32f00b3..a24fe40 100644
--- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureGather_d90605() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl
index e4e7524..c1c9e72 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<f32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<f32>
fn textureGather_d98d59() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl
index 5636e11..68e7ca4 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d98d59() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl
index 5636e11..68e7ca4 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_d98d59() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl
index b764f21..4d7e894 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm
index eb9a8ab..d2be53c 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -46,58 +46,59 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %33 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpTypeFunction %v4float
%textureGather_d98d59 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %int_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %33 = OpLoad %v3float %arg_3
- %34 = OpCompositeExtract %float %33 0
- %35 = OpCompositeExtract %float %33 1
- %36 = OpCompositeExtract %float %33 2
- %38 = OpLoad %int %arg_4
- %37 = OpConvertSToF %float %38
- %39 = OpCompositeConstruct %v4float %34 %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %35 = OpLoad %v3float %arg_3
+ %36 = OpCompositeExtract %float %35 0
+ %37 = OpCompositeExtract %float %35 1
+ %38 = OpCompositeExtract %float %35 2
+ %40 = OpLoad %int %arg_4
+ %39 = OpConvertSToF %float %40
+ %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_d98d59
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_d98d59
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_d98d59
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_d98d59
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_d98d59
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_d98d59
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl
index dc7f8c7..fb91e26 100644
--- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_d98d59() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
index b51c3e5..365b22f 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl
@@ -26,8 +26,8 @@
// fn textureGather(@const component: u32, texture: texture_2d<i32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<i32>
fn textureGather_dc6661() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.f);
+ const arg_4 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
index 0fc31ac..3c686c6 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_dc6661() {
- float2 arg_3 = (0.0f).xx;
- int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
index 0fc31ac..3c686c6 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_dc6661() {
- float2 arg_3 = (0.0f).xx;
- int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx);
+ float2 arg_3 = (1.0f).xx;
+ int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
index 98f224d..4c66cb9 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl
@@ -3,8 +3,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_dc6661() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -26,8 +26,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_dc6661() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void fragment_main() {
@@ -43,8 +43,8 @@
uniform highp isampler2D arg_1_arg_2;
void textureGather_dc6661() {
- vec2 arg_3 = vec2(0.0f);
- ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u));
+ vec2 arg_3 = vec2(1.0f);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
index 479290e..08dd959 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureGather_dc6661(texture2d<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y);
+ float2 arg_3 = float2(1.0f);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
index a6e8142..0f57540 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,50 +45,52 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%v4int = OpTypeVector %int 4
- %28 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%v2int = OpTypeVector %int 2
- %34 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %37 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %37 = OpConstantNull %v4int
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %40 = OpConstantNull %v4int
+ %41 = OpTypeFunction %v4float
%textureGather_dc6661 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %res = OpVariable %_ptr_Function_v4int Function %37
- OpStore %arg_3 %21
- %26 = OpLoad %15 %arg_2
- %27 = OpLoad %11 %arg_1
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_3
- %24 = OpImageGather %v4int %29 %30 %uint_1 ConstOffset %34
- OpStore %res %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %40
+ OpStore %arg_3 %22
+ %28 = OpLoad %15 %arg_2
+ %29 = OpLoad %11 %arg_1
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_3
+ %26 = OpImageGather %v4int %31 %32 %uint_1 ConstOffset %37
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureGather_dc6661
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureGather_dc6661
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_dc6661
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_dc6661
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_dc6661
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_dc6661
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
index b639399..8e2e84e 100644
--- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl
@@ -4,8 +4,8 @@
fn textureGather_dc6661() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
- const arg_4 = vec2<i32>();
+ var arg_3 = vec2<f32>(1.0f);
+ const arg_4 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
index 6d145fa..7b40592 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<u32>
fn textureGather_e2acac() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1u;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
index 57cafd4..a3242e3 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e2acac() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
index 57cafd4..a3242e3 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e2acac() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
uint arg_4 = 1u;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
index 1fdaddc..4044a85 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
uint arg_4 = 1u;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
index f6a7322..6650551 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,57 +47,58 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %43 = OpConstantNull %v4uint
- %44 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpConstantNull %v4uint
+ %46 = OpTypeFunction %v4float
%textureGather_e2acac = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
- %res = OpVariable %_ptr_Function_v4uint Function %43
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
+ %res = OpVariable %_ptr_Function_v4uint Function %45
+ OpStore %arg_3 %22
OpStore %arg_4 %uint_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %37 = OpCompositeExtract %float %34 2
- %39 = OpLoad %uint %arg_4
- %38 = OpConvertUToF %float %39
- %40 = OpCompositeConstruct %v4float %35 %36 %37 %38
- %28 = OpImageGather %v4uint %33 %40 %uint_1
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %39 = OpCompositeExtract %float %36 2
+ %41 = OpLoad %uint %arg_4
+ %40 = OpConvertUToF %float %41
+ %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
+ %30 = OpImageGather %v4uint %35 %42 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGather_e2acac
+%vertex_main_inner = OpFunction %v4float None %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGather_e2acac
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %51 = OpLabel
+ %52 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureGather_e2acac
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureGather_e2acac
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGather_e2acac
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGather_e2acac
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
index f3fda10..bf9657f 100644
--- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_e2acac() {
const arg_0 = 1u;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl
index a261325..145f621 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl
index 81a031d..7d57cba 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e3165f() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl
index 81a031d..7d57cba 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e3165f() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl
index 6239d68..e96d0ae 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_e3165f() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_e3165f() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp usampler2DArray arg_1_arg_2;
void textureGather_e3165f() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u));
+ uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl
index 89f5559..6891bef 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_e3165f(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm
index b246f34..7dd439e 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%uint_1 = OpConstant %uint 1
%v2int = OpTypeVector %int 2
- %44 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %47 = OpConstantNull %v4uint
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %49 = OpConstantNull %v4uint
+ %50 = OpTypeFunction %v4float
%textureGather_e3165f = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %47
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %49
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_3
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %uint_1 ConstOffset %44
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_3
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %uint_1 ConstOffset %46
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGather_e3165f
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_e3165f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_e3165f
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_e3165f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureGather_e3165f
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureGather_e3165f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl
index 4f62566..2cd2864 100644
--- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_e3165f() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl
index 167a0b2..c7f277d 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl
@@ -26,9 +26,9 @@
// 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() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl
index 303164a..0604af7 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e9d390() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl
index 303164a..0604af7 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_e9d390() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
int arg_4 = 1;
- int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx);
+ int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl
index 51dbcc1..9c122b8 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_e9d390() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_e9d390() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp isampler2DArray arg_1_arg_2;
void textureGather_e9d390() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
int arg_4 = 1;
- ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1);
+ ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1);
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl
index 6d75549..28ce256 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGather_e9d390(texture2d_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
int arg_4 = 1;
- int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
+ int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm
index 0748d70..0092cc8 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,59 +46,60 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %21 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %25 = OpConstantNull %v2float
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %32 = OpTypeSampledImage %11
+ %34 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %42 = OpConstantNull %v2int
+ %44 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %45 = OpConstantNull %v4int
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %47 = OpConstantNull %v4int
+ %48 = OpTypeFunction %v4float
%textureGather_e9d390 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %27
- %res = OpVariable %_ptr_Function_v4int Function %45
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
+ %res = OpVariable %_ptr_Function_v4int Function %47
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %30 = OpLoad %15 %arg_2
- %31 = OpLoad %11 %arg_1
- %33 = OpSampledImage %32 %31 %30
- %35 = OpLoad %v2float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %39 = OpLoad %int %arg_4
- %38 = OpConvertSToF %float %39
- %40 = OpCompositeConstruct %v3float %36 %37 %38
- %28 = OpImageGather %v4int %33 %40 %int_1 ConstOffset %42
- OpStore %res %28
+ %32 = OpLoad %15 %arg_2
+ %33 = OpLoad %11 %arg_1
+ %35 = OpSampledImage %34 %33 %32
+ %37 = OpLoad %v2float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %41 = OpLoad %int %arg_4
+ %40 = OpConvertSToF %float %41
+ %42 = OpCompositeConstruct %v3float %38 %39 %40
+ %30 = OpImageGather %v4int %35 %42 %int_1 ConstOffset %44
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGather_e9d390
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureGather_e9d390
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureGather_e9d390
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureGather_e9d390
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureGather_e9d390
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGather_e9d390
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl
index 6cf5907..1f1750b 100644
--- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl
@@ -4,9 +4,9 @@
fn textureGather_e9d390() {
const arg_0 = 1i;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<i32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
index dc6250b..5e60b91 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
fn textureGather_ea8eb4() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.f);
var arg_4 = 1u;
var res: vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
index 0759fa5..a9e5e58 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ea8eb4() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
index 0759fa5..a9e5e58 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_ea8eb4() {
- float2 arg_3 = (0.0f).xx;
+ float2 arg_3 = (1.0f).xx;
uint arg_4 = 1u;
float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
index 87e62b4..5a389b9 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_ea8eb4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -27,7 +27,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_ea8eb4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
@@ -45,7 +45,7 @@
uniform highp sampler2DArray arg_1_arg_2;
void textureGather_ea8eb4() {
- vec2 arg_3 = vec2(0.0f);
+ vec2 arg_3 = vec2(1.0f);
uint arg_4 = 1u;
vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u));
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
index 51fd170..5e246ec 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_3 = float2(0.0f);
+ float2 arg_3 = float2(1.0f);
uint arg_4 = 1u;
float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
index e629bb7..1b348a4 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,56 +45,57 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %31 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %33 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %44 = OpTypeFunction %v4float
%textureGather_ea8eb4 = OpFunction %void None %15
%18 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_3 %20
+ OpStore %arg_3 %21
OpStore %arg_4 %uint_1
- %29 = OpLoad %14 %arg_2
- %30 = OpLoad %11 %arg_1
- %32 = OpSampledImage %31 %30 %29
- %34 = OpLoad %v2float %arg_3
- %35 = OpCompositeExtract %float %34 0
- %36 = OpCompositeExtract %float %34 1
- %38 = OpLoad %uint %arg_4
- %37 = OpConvertUToF %float %38
- %39 = OpCompositeConstruct %v3float %35 %36 %37
- %28 = OpImageGather %v4float %32 %39 %uint_1
- OpStore %res %28
+ %31 = OpLoad %14 %arg_2
+ %32 = OpLoad %11 %arg_1
+ %34 = OpSampledImage %33 %32 %31
+ %36 = OpLoad %v2float %arg_3
+ %37 = OpCompositeExtract %float %36 0
+ %38 = OpCompositeExtract %float %36 1
+ %40 = OpLoad %uint %arg_4
+ %39 = OpConvertUToF %float %40
+ %41 = OpCompositeConstruct %v3float %37 %38 %39
+ %30 = OpImageGather %v4float %34 %41 %uint_1
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureGather_ea8eb4
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureGather_ea8eb4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureGather_ea8eb4
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureGather_ea8eb4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_ea8eb4
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_ea8eb4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
index 5062f18..63fe006 100644
--- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_ea8eb4() {
const arg_0 = 1u;
- var arg_3 = vec2<f32>();
+ var arg_3 = vec2<f32>(1.0f);
var arg_4 = 1u;
var res : vec4<f32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl
index b1bdb2d..4d6a8b4 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl
@@ -26,7 +26,7 @@
// fn textureGather(@const component: i32, texture: texture_cube_array<u32>, sampler: sampler, coords: vec3<f32>, array_index: i32) -> vec4<u32>
fn textureGather_f2c6e3() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.f);
var arg_4 = 1i;
var res: vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl
index e7b6ba8..358b397 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_f2c6e3() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl
index e7b6ba8..358b397 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_2 : register(s2, space1);
void textureGather_f2c6e3() {
- float3 arg_3 = (0.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
int arg_4 = 1;
uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4)));
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl
index 088082f..b356eb9 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_3 = float3(0.0f);
+ float3 arg_3 = float3(1.0f);
int arg_4 = 1;
uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y);
}
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm
index 2fba92b..36837a2 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,58 +47,59 @@
%void = OpTypeVoid
%16 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %21 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %25 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %28 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %33 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %44 = OpConstantNull %v4uint
- %45 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %46 = OpConstantNull %v4uint
+ %47 = OpTypeFunction %v4float
%textureGather_f2c6e3 = OpFunction %void None %16
%19 = OpLabel
- %arg_3 = OpVariable %_ptr_Function_v3float Function %21
- %arg_4 = OpVariable %_ptr_Function_int Function %28
- %res = OpVariable %_ptr_Function_v4uint Function %44
- OpStore %arg_3 %21
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %25
+ %arg_4 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %46
+ OpStore %arg_3 %22
OpStore %arg_4 %int_1
- %31 = OpLoad %15 %arg_2
- %32 = OpLoad %11 %arg_1
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_3
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %int %arg_4
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %29 = OpImageGather %v4uint %34 %41 %int_1
- OpStore %res %29
+ %33 = OpLoad %15 %arg_2
+ %34 = OpLoad %11 %arg_1
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_3
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_4
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %31 = OpImageGather %v4uint %36 %43 %int_1
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %45
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureGather_f2c6e3
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGather_f2c6e3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %16
- %50 = OpLabel
- %51 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %51
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %16
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGather_f2c6e3
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGather_f2c6e3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGather_f2c6e3
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGather_f2c6e3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl
index 3a4243c..3005c80 100644
--- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl
@@ -4,7 +4,7 @@
fn textureGather_f2c6e3() {
const arg_0 = 1i;
- var arg_3 = vec3<f32>();
+ var arg_3 = vec3<f32>(1.0f);
var arg_4 = 1i;
var res : vec4<u32> = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
index f54540c..e0d3b6e 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
index 889e75c..ee5d38a 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_144a9a() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
index 889e75c..ee5d38a 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_144a9a() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
index 000522c..5920e0e 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_144a9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_144a9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_144a9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
index 2332e49..6e0c82f 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureGatherCompare_144a9a(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0));
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
index d2973ef..c027f94 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,63 +46,65 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %46 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %48 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %49 = OpTypeFunction %v4float
+ %51 = OpTypeFunction %v4float
%textureGatherCompare_144a9a = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %46
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44 ConstOffset %48
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %49
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureGatherCompare_144a9a
+%vertex_main_inner = OpFunction %v4float None %51
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureGatherCompare_144a9a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %55
+ %56 = OpLabel
+ %57 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %57
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGatherCompare_144a9a
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureGatherCompare_144a9a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureGatherCompare_144a9a
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureGatherCompare_144a9a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
index 3544909..bff46b7 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_144a9a() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl
index 1c12576..c021e00 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl
index 294d4d3..775595e 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_182fd4() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl
index 294d4d3..775595e 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_182fd4() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl
index af1dd4d..7d7d856 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGatherCompare_182fd4() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
@@ -27,7 +27,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGatherCompare_182fd4() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
@@ -45,7 +45,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureGatherCompare_182fd4() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl
index 5f3be12..34f3a8c 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm
index e8bd4b7..e276158 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureGatherCompare_182fd4 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageDrefGather %v4float %30 %31 %32
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageDrefGather %v4float %31 %32 %33
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGatherCompare_182fd4
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGatherCompare_182fd4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureGatherCompare_182fd4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGatherCompare_182fd4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGatherCompare_182fd4
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGatherCompare_182fd4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl
index d2d4c30..e810f09 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_182fd4() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
index d6ea315..7ca38fb 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
index 625ef635..fb2cc17 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_2e409c() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
index 625ef635..fb2cc17 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_2e409c() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
index bd7e100..7f17941 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
index e65e051..c937e06 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureGatherCompare_2e409c = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGatherCompare_2e409c
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGatherCompare_2e409c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGatherCompare_2e409c
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGatherCompare_2e409c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGatherCompare_2e409c
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGatherCompare_2e409c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
index 384d9fd..1534917 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_2e409c() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl
index 6dee4b9..58b2f55 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl
@@ -25,9 +25,9 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl
index c92a22b..46845ac 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_313add() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl
index c92a22b..46845ac 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_313add() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl
index 951aa5a..fc17439 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_313add() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_313add() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_313add() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl
index 4862938..461ee05 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureGatherCompare_313add(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
- float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, int2(0));
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm
index fe55f7a..2584713 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.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
@@ -45,51 +45,53 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %35 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %37 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%textureGatherCompare_313add = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageDrefGather %v4float %30 %31 %32 ConstOffset %35
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageDrefGather %v4float %31 %32 %33 ConstOffset %37
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureGatherCompare_313add
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureGatherCompare_313add
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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 %textureGatherCompare_313add
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureGatherCompare_313add
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureGatherCompare_313add
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGatherCompare_313add
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl
index bf8dea8..9b3cb2c 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_313add() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl
index bfb5ad1..fc82524 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl
index a0284d8..76afffa 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_60d2d1() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl
index a0284d8..76afffa 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_60d2d1() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl
index 682a170..ee19149 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm
index 660f0f3..2320452 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureGatherCompare_60d2d1 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGatherCompare_60d2d1
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGatherCompare_60d2d1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGatherCompare_60d2d1
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGatherCompare_60d2d1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGatherCompare_60d2d1
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGatherCompare_60d2d1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl
index 4ecb26c..3937d85 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_60d2d1() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl
index 083163e..5802254 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl
index 6c7d0f4..d136dca 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_6d9352() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl
index 6c7d0f4..d136dca 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_6d9352() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl
index b57e663..94b92bb 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_6d9352() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
@@ -27,7 +27,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_6d9352() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
@@ -45,7 +45,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_6d9352() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl
index ce42345..2dc296d 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm
index 0a6a857..eaab3ee 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureGatherCompare_6d9352 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageDrefGather %v4float %30 %31 %32
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageDrefGather %v4float %31 %32 %33
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureGatherCompare_6d9352
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureGatherCompare_6d9352
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureGatherCompare_6d9352
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureGatherCompare_6d9352
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureGatherCompare_6d9352
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureGatherCompare_6d9352
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl
index c202682..e7aff07 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_6d9352() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl
index f3d7bbb..60450e1 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl
index c0b2cce..827c246 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_783e65() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl
index c0b2cce..827c246 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_783e65() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl
index 84f32d5..a137b93 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_783e65() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -28,7 +28,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_783e65() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -47,7 +47,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_783e65() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl
index b6aade7..5d7179d 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm
index 9b37b33..9d93082 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureGatherCompare_783e65 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGatherCompare_783e65
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGatherCompare_783e65
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGatherCompare_783e65
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGatherCompare_783e65
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGatherCompare_783e65
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGatherCompare_783e65
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl
index f6d5b8f..cbb0d13 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_783e65() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
index 0dd8c4d..03eef71 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
index f663775..a4ffc04 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_b5bc43() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
index f663775..a4ffc04 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_b5bc43() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
index 5e394d1..ecc3638 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_b5bc43() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -28,7 +28,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_b5bc43() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -47,7 +47,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_b5bc43() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
index 24c567b..31fc042 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
index 770ddcf..e67de9f 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureGatherCompare_b5bc43 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureGatherCompare_b5bc43
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureGatherCompare_b5bc43
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureGatherCompare_b5bc43
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureGatherCompare_b5bc43
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureGatherCompare_b5bc43
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
index a17ccf0..7740030 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_b5bc43() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl
index a9cb427..f742acd 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl
index eef0720..f4905b5 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_f585cc() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl
index eef0720..f4905b5 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureGatherCompare_f585cc() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl
index 8ae1b0a..38f91d2 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_f585cc() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_f585cc() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureGatherCompare_f585cc() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl
index 31ed159..adfe72c 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureGatherCompare_f585cc(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0));
+ float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm
index 9d23a22..498b0fe 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,62 +46,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %45 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %48 = OpTypeFunction %v4float
+ %49 = OpTypeFunction %v4float
%textureGatherCompare_f585cc = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %45
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageDrefGather %v4float %36 %43 %44 ConstOffset %46
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureGatherCompare_f585cc
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureGatherCompare_f585cc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureGatherCompare_f585cc
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureGatherCompare_f585cc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureGatherCompare_f585cc
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureGatherCompare_f585cc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl
index e3983d2..e495b0f 100644
--- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureGatherCompare_f585cc() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl
index ad2c4e1..d8febef 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: u32) -> vec4<f32>
fn textureLoad_019da0() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl
index d7d9113..f661e8d 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_019da0() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
float4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl
index d7d9113..f661e8d 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_019da0() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
float4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl
index f4f76c3..62b9a35 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_019da0() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_019da0() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_019da0() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl
index 9355436..78ea10c 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_019da0(texture3d<float, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm
index b3dc43b..3c9fcae 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_019da0 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Lod %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_019da0
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_019da0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_019da0
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_019da0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_019da0
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_019da0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl
index 90c7618..d4653f6 100644
--- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<f32>;
fn textureLoad_019da0() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl
index 8cca36c..74edd08 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl
index bd6e939..e8a34dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_026217() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl
index bd6e939..e8a34dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_026217() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl
index 182e968..57801df 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_026217() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_026217() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_026217() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl
index 4e2fc4d..68fe376 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_026217(texture2d_array<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm
index fd8d9f2..9e98066 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,60 +41,61 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %42 = OpConstantNull %v4uint
- %43 = OpTypeFunction %v4float
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_026217 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %29
- %res = OpVariable %_ptr_Function_v4uint Function %42
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %37 = OpLoad %uint %arg_2
- %38 = OpCompositeConstruct %v3uint %35 %36 %37
- %39 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4uint %32 %38 Lod %39
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %38 = OpLoad %uint %arg_2
+ %39 = OpCompositeConstruct %v3uint %36 %37 %38
+ %40 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4uint %33 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_026217
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_026217
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_026217
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_026217
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_026217
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_026217
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl
index 1e2a15b..b117b2d 100644
--- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_026217() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl
index 6047511..dc1160e 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl
index bce9f3c..fec8d4f 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_04b911() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl
index bce9f3c..fec8d4f 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_04b911() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl
index 2742b07..4427e30 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_04b911() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_04b911() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_04b911() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl
index a8900e9..12f55f7d 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_04b911(depth2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm
index bcdf21d..fc8d6f5 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,60 +41,61 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
- %uint_1 = OpConstant %uint 1
+ %27 = OpConstantNull %int
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v3uint = OpTypeVector %uint 3
%_ptr_Function_float = OpTypePointer Function %float
- %43 = OpTypeFunction %v4float
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_04b911 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %38 = OpLoad %int %arg_2
- %37 = OpBitcast %uint %38
- %39 = OpCompositeConstruct %v3uint %35 %36 %37
- %40 = OpLoad %uint %arg_3
- %31 = OpImageFetch %v4float %32 %39 Lod %40
- %30 = OpCompositeExtract %float %31 0
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %uint %arg_3
+ %32 = OpImageFetch %v4float %33 %40 Lod %41
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_04b911
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_04b911
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_04b911
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_04b911
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_04b911
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_04b911
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl
index ee48583..bdff948 100644
--- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_04b911() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl
index 2563e1c..2f1e52a 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl
index 56cc8e8..abc8e57 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_168dc8() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl
index 56cc8e8..abc8e57 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_168dc8() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl
index a0cc687..cca08c5 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_168dc8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_168dc8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_168dc8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl
index 3ade60f..b157f12 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_168dc8(texture2d_array<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int arg_3 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm
index 4febae6..fd2efd2 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,57 +42,59 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %40 = OpConstantNull %v4int
- %41 = OpTypeFunction %v4float
+ %42 = OpConstantNull %v4int
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_168dc8 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4int Function %40
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %42
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %int %arg_3
- %27 = OpImageFetch %v4int %29 %36 Lod %37
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %37 = OpLoad %int %arg_2
+ %36 = OpBitcast %uint %37
+ %38 = OpCompositeConstruct %v3uint %34 %35 %36
+ %39 = OpLoad %int %arg_3
+ %29 = OpImageFetch %v4int %31 %38 Lod %39
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_168dc8
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_168dc8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_168dc8
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_168dc8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_168dc8
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_168dc8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl
index 6642f02..ccd9e51 100644
--- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_168dc8() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl
index 4863704..3614c35 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
fn textureLoad_19cf87() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl
index b9e2e0d..6482ac0 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_19cf87() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float res = arg_0.Load(int3(arg_1, arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl
index b9e2e0d..6482ac0 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_19cf87() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float res = arg_0.Load(int3(arg_1, arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl
index 0f4a833..d202d31 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_19cf87() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_19cf87() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_19cf87() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl
index 19f28cd..72e24bb 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_19cf87(depth2d<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm
index 9f43b72..cd11687 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.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
@@ -40,48 +40,49 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %32 = OpTypeFunction %v4float
+ %33 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_19cf87 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- %25 = OpCompositeExtract %float %26 0
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %int %arg_2
+ %27 = OpImageFetch %v4float %28 %29 Lod %30
+ %26 = OpCompositeExtract %float %27 0
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_19cf87
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_19cf87
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_19cf87
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_19cf87
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_19cf87
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_19cf87
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl
index 4eac972..203dfc5 100644
--- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d;
fn textureLoad_19cf87() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl
index c493409..dff77c1 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl
index d638828..ce8e545 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_1b051f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl
index d638828..ce8e545 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_1b051f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl
index 8e6d181..6072777 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_1b051f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_1b051f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_1b051f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl
index ddf4a08..c61f6ff 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_1b051f(texture2d_array<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm
index fd14d43..9dce9cd 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,57 +42,59 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %40 = OpConstantNull %v4uint
- %41 = OpTypeFunction %v4float
+ %42 = OpConstantNull %v4uint
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_1b051f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %40
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %42
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %uint %arg_3
- %27 = OpImageFetch %v4uint %29 %36 Lod %37
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %37 = OpLoad %uint %arg_2
+ %36 = OpBitcast %int %37
+ %38 = OpCompositeConstruct %v3int %34 %35 %36
+ %39 = OpLoad %uint %arg_3
+ %29 = OpImageFetch %v4uint %31 %38 Lod %39
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_1b051f
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_1b051f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_1b051f
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_1b051f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_1b051f
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_1b051f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl
index 576677d..c941b74 100644
--- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_1b051f() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
index 13db23e..7c1e957 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_external, coords: vec2<u32>) -> vec4<f32>
fn textureLoad_1bfdfb() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var res: vec4<f32> = textureLoad(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
index 5e1e301..dd7959d 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl
@@ -80,7 +80,7 @@
}
void textureLoad_1bfdfb() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
index 5e1e301..dd7959d 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl
@@ -80,7 +80,7 @@
}
void textureLoad_1bfdfb() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
index adc2cf9..4011eb4 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/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() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
@@ -118,7 +118,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
void textureLoad_1bfdfb() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
@@ -181,7 +181,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
void textureLoad_1bfdfb() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
index f18ad2f..2de6a9d 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
index c1606c9..d9c8b31 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 141
+; Bound: 142
; Schema: 0
OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450"
@@ -115,12 +115,13 @@
%93 = OpConstantNull %uint
%void = OpTypeVoid
%111 = OpTypeFunction %void
- %115 = OpConstantNull %v2uint
+ %115 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %118 = OpConstantNull %v2uint
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %128 = OpTypeFunction %v4float
+ %129 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %22
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@@ -214,37 +215,37 @@
OpFunctionEnd
%textureLoad_1bfdfb = OpFunction %void None %111
%114 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %115
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %118
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %115
- %119 = OpLoad %11 %arg_0
- %120 = OpLoad %11 %ext_tex_plane_1
- %121 = OpLoad %v2uint %arg_1
- %124 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
- %125 = OpLoad %ExternalTextureParams %124
- %118 = OpFunctionCall %v4float %textureLoadExternal %119 %120 %121 %125
- OpStore %res %118
+ %120 = OpLoad %11 %arg_0
+ %121 = OpLoad %11 %ext_tex_plane_1
+ %122 = OpLoad %v2uint %arg_1
+ %125 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %126 = OpLoad %ExternalTextureParams %125
+ %119 = OpFunctionCall %v4float %textureLoadExternal %120 %121 %122 %126
+ OpStore %res %119
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %128
- %130 = OpLabel
- %131 = OpFunctionCall %void %textureLoad_1bfdfb
+%vertex_main_inner = OpFunction %v4float None %129
+ %131 = OpLabel
+ %132 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %111
- %133 = OpLabel
- %134 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %134
+ %134 = OpLabel
+ %135 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %135
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %111
- %136 = OpLabel
- %137 = OpFunctionCall %void %textureLoad_1bfdfb
+ %137 = OpLabel
+ %138 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %111
- %139 = OpLabel
- %140 = OpFunctionCall %void %textureLoad_1bfdfb
+ %140 = OpLabel
+ %141 = OpFunctionCall %void %textureLoad_1bfdfb
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
index 52a6fc3..9e3fd90 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_external;
fn textureLoad_1bfdfb() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var res : vec4<f32> = textureLoad(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
index edd5e4d..550618f 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: u32) -> vec4<u32>
fn textureLoad_1c562a() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
index 0bb5f34..332dd71 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_1c562a() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
index 0bb5f34..332dd71 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_1c562a() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
index 846f8f5..c028bc9 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_1c562a() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_1c562a() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_1c562a() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
index a8cffe5..f00e162 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_1c562a(texture3d<uint, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
index ee1302d..afcdd7f 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
-%_ptr_Function_v3uint = OpTypePointer Function %v3uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %22 = OpConstantNull %v3uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %32 = OpConstantNull %v4uint
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_1c562a = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %res = OpVariable %_ptr_Function_v4uint Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4uint %27 %28 Lod %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4uint %28 %29 Lod %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_1c562a
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_1c562a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_1c562a
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_1c562a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_1c562a
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_1c562a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
index 6f9672a..376ef18 100644
--- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<u32>;
fn textureLoad_1c562a() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl
index f075b9d..8bdaca3 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: i32) -> vec4<f32>
fn textureLoad_1f2016() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl
index 391759d..7bd7b08 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_1f2016() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
float4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl
index 391759d..7bd7b08 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_1f2016() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
float4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl
index 57b8362..d9d2ec2 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_1f2016() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_1f2016() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_1f2016() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl
index 3448c42..77871f5 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_1f2016(texture3d<float, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm
index cc9edd3..e23cbd2 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
-%_ptr_Function_v3int = OpTypePointer Function %v3int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_1f2016 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4float %26 %27 Lod %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3int %arg_1
+ %29 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Lod %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_1f2016
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_1f2016
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_1f2016
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_1f2016
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_1f2016
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_1f2016
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl
index 6b1d5be..75c7236 100644
--- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<f32>;
fn textureLoad_1f2016() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
index 39593e8..3ef6188 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: u32) -> vec4<f32>
fn textureLoad_21d1c4() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
index 28c9d44..e640c93 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_21d1c4() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
float4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
index 28c9d44..e640c93 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_21d1c4() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
float4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
index addbf63..68354e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_21d1c4() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_21d1c4() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_21d1c4() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
index c3441bf..c9d0473 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_21d1c4(texture3d<float, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
index 6d18184..1f7c324 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
-%_ptr_Function_v3uint = OpTypePointer Function %v3uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %22 = OpConstantNull %v3uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_21d1c4 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3uint %arg_1
- %28 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4float %26 %27 Lod %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v3uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Lod %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_21d1c4
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_21d1c4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_21d1c4
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_21d1c4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_21d1c4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_21d1c4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
index f363fde..5bcf246 100644
--- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<f32>;
fn textureLoad_21d1c4() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl
index 732e25a..2cb9d28 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: i32) -> vec4<i32>
fn textureLoad_223246() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl
index 1589eae..91694ca 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_223246() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
int4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl
index 1589eae..91694ca 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_223246() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
int4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl
index 127badd..364d598 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_223246() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_223246() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_223246() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl
index 324ebe6..cd54745 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_223246(texture3d<int, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm
index a5ebb89..2d7fb32 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_223246 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v3uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_223246
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_223246
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_223246
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_223246
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_223246
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_223246
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl
index 119a40b..646ea84 100644
--- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<i32>;
fn textureLoad_223246() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl
index 99b25df..70494bc 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl
index b3099c3..2f03a64 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_2363be() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl
index b3099c3..2f03a64 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_2363be() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl
index 56f9130..1251723 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_2363be() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_2363be() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_2363be() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl
index 74c4e16..2a955c5 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_2363be(texture2d_array<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm
index 7995b70..ee273d8 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,60 +42,61 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
- %uint_1 = OpConstant %uint 1
+ %27 = OpConstantNull %int
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %43 = OpConstantNull %v4int
- %44 = OpTypeFunction %v4float
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_2363be = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
- %res = OpVariable %_ptr_Function_v4int Function %43
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %38 = OpLoad %int %arg_2
- %37 = OpBitcast %uint %38
- %39 = OpCompositeConstruct %v3uint %35 %36 %37
- %40 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4int %32 %39 Lod %40
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4int %33 %40 Lod %41
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_2363be
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_2363be
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_2363be
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_2363be
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureLoad_2363be
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureLoad_2363be
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl
index 35157c0..3a453a7 100644
--- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_2363be() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl
index 69b005c..2365ade 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: u32) -> vec4<f32>
fn textureLoad_2d479c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl
index 364f342..b92c9e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_2d479c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl
index 364f342..b92c9e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_2d479c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl
index 87a8fd9..c8adc02 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_2d479c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_2d479c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_2d479c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl
index fa0fc90..c55a8c2 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_2d479c(texture2d<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm
index 59d6c52..998c827 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_2d479c = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Lod %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_2d479c
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_2d479c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_2d479c
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_2d479c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_2d479c
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_2d479c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl
index 1740e11..d29f519 100644
--- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<f32>;
fn textureLoad_2d479c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
index 9a79fe2..27f61c6 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
index 0219fc6..fa848d3 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_2e09aa() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
index 0219fc6..fa848d3 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_2e09aa() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
index e6b2a00..237f311 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_2e09aa() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_2e09aa() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_2e09aa() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
index f1ec214..b7cc5d0 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_2e09aa(texture2d_ms<float, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
index 751b31e..58dcfbb 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_2e09aa = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4float %26 %27 Sample %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Sample %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_2e09aa
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_2e09aa
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_2e09aa
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_2e09aa
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_2e09aa
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_2e09aa
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
index 22a0a70..2a0781b 100644
--- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
fn textureLoad_2e09aa() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl
index dc74980..526039a 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl
index 775c51a..ee90bc4 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_38f8ab() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl
index 775c51a..ee90bc4 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_38f8ab() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl
index be03c72..4499324 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_38f8ab() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_38f8ab() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_38f8ab() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl
index fb04229..6749f45 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_38f8ab(texture2d_ms<int, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm
index 426ee5b..7c8c28a 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_38f8ab = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Sample %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Sample %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_38f8ab
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_38f8ab
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_38f8ab
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_38f8ab
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_38f8ab
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_38f8ab
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl
index c09340e..33fdb48 100644
--- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
fn textureLoad_38f8ab() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl
index 9a60cf5..212e8f0 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl
index 4a6573b..5fbc79d 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_3c96e8() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl
index 4a6573b..5fbc79d 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_3c96e8() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl
index 4c840ce..764dd98 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_3c96e8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_3c96e8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_3c96e8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl
index f9c58d0..61f0a95 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_3c96e8(texture2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm
index fe674a3..5729843 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 55
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,58 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v3int = OpTypeVector %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %39 = OpTypeFunction %v4float
+ %41 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_3c96e8 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %34 = OpLoad %uint %arg_2
- %33 = OpBitcast %int %34
- %35 = OpCompositeConstruct %v3int %31 %32 %33
- %36 = OpLoad %uint %arg_3
- %27 = OpImageFetch %v4float %28 %35 Lod %36
- OpStore %res %27
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpCompositeExtract %int %32 0
+ %34 = OpCompositeExtract %int %32 1
+ %36 = OpLoad %uint %arg_2
+ %35 = OpBitcast %int %36
+ %37 = OpCompositeConstruct %v3int %33 %34 %35
+ %38 = OpLoad %uint %arg_3
+ %29 = OpImageFetch %v4float %30 %37 Lod %38
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_3c96e8
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_3c96e8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureLoad_3c96e8
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_3c96e8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_3c96e8
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_3c96e8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl
index 7ef60df..989fcd1 100644
--- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_3c96e8() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl
index 6db9486..a334be3 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl
index e2bc144..0bcbf5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_3d3fd1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl
index e2bc144..0bcbf5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_3d3fd1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl
index 7b27d90..d6c9668 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_3d3fd1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_3d3fd1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_3d3fd1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl
index 96fb2e5..a8b111d 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_3d3fd1(texture2d_array<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm
index 75c9dbb..bead114 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,59 +42,60 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %42 = OpConstantNull %v4int
- %43 = OpTypeFunction %v4float
+ %43 = OpConstantNull %v4int
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_3d3fd1 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %29
- %res = OpVariable %_ptr_Function_v4int Function %42
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %43
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %37 = OpLoad %uint %arg_2
- %38 = OpCompositeConstruct %v3uint %35 %36 %37
- %39 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4int %32 %38 Lod %39
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %38 = OpLoad %uint %arg_2
+ %39 = OpCompositeConstruct %v3uint %36 %37 %38
+ %40 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4int %33 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_3d3fd1
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_3d3fd1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_3d3fd1
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_3d3fd1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_3d3fd1
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_3d3fd1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl
index 600e3fd..cb5a986 100644
--- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_3d3fd1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl
index e14788e..b143637 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: i32) -> vec4<f32>
fn textureLoad_439e2a() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl
index a1ae75e..4a20f15 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_439e2a() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl
index a1ae75e..4a20f15 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_439e2a() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl
index a22fd5a..43a6e79 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_439e2a() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_439e2a() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_439e2a() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl
index 5a3246d..cb28c38 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_439e2a(texture2d<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm
index f7cc6a4..0244e8f 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_439e2a = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Lod %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_439e2a
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_439e2a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_439e2a
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_439e2a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_439e2a
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_439e2a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl
index a46785f..49c8ef6 100644
--- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<f32>;
fn textureLoad_439e2a() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl
index 466e57b..ecd9e2d 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl
index 765ad54..a304c23 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_46a93f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl
index 765ad54..a304c23 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_46a93f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl
index c048820..6679489 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_46a93f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_46a93f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_46a93f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl
index 2116606..71ac80d 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_46a93f(texture2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm
index 009e43c..c227fb8 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,59 +41,60 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
- %uint_1 = OpConstant %uint 1
+ %27 = OpConstantNull %int
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_46a93f = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4float %31 %38 Lod %39
- OpStore %res %30
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %38 = OpLoad %int %arg_2
+ %37 = OpBitcast %uint %38
+ %39 = OpCompositeConstruct %v3uint %35 %36 %37
+ %40 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4float %32 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_46a93f
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_46a93f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_46a93f
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_46a93f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureLoad_46a93f
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_46a93f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl
index 54c6d9eb..5397895 100644
--- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_46a93f() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
index 98c9832..031a744 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<i32>, coords: vec3<u32>, level: u32) -> vec4<i32>
fn textureLoad_47e818() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
index 71c7aac..47f141f 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_47e818() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
int4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
index 71c7aac..47f141f 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_47e818() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
uint arg_2 = 1u;
int4 res = arg_0.Load(uint4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
index a734ffb..fc24559 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_47e818() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_47e818() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_47e818() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
index 7f3d122..56a4c7f 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_47e818(texture3d<int, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
index b4a1420..4e54df7 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
-%_ptr_Function_v3uint = OpTypePointer Function %v3uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_47e818 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3uint %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3uint %arg_1
+ %31 = OpLoad %uint %arg_2
+ %27 = OpImageFetch %v4int %29 %30 Lod %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_47e818
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_47e818
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_47e818
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_47e818
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_47e818
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_47e818
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
index 1086f04..a12e28a 100644
--- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<i32>;
fn textureLoad_47e818() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl
index 2c2009fa..552b7df 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: i32) -> vec4<f32>
fn textureLoad_484344() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl
index 0a3f447..f3fe7c7 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_484344() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl
index 0a3f447..f3fe7c7 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_484344() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl
index d9fbf92..81960e3 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_484344() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_484344() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_484344() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl
index f940852..6697cc8 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_484344(texture2d<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm
index a94e4a0..19acab1 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/484344.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_484344 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4float %26 %27 Lod %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2int %arg_1
+ %29 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Lod %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_484344
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_484344
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_484344
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_484344
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_484344
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_484344
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl
index a11fc7e..7cf5e98 100644
--- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<f32>;
fn textureLoad_484344() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
index 034fef4..feebbc1 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
index 16d7d8d..675a966 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_49f76f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
index 16d7d8d..675a966 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_49f76f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
index 7e0cd86..2da3218 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_49f76f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_49f76f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_49f76f() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
index af663e0..d02c066 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_49f76f(texture2d_ms<uint, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
index 51c8570..fce5a33 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %32 = OpConstantNull %v4uint
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_49f76f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %res = OpVariable %_ptr_Function_v4uint Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4uint %27 %28 Sample %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4uint %28 %29 Sample %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_49f76f
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_49f76f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_49f76f
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_49f76f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_49f76f
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_49f76f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
index 9a6fcc7..44b947f 100644
--- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
fn textureLoad_49f76f() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl
index 845846a..19e2c4c 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl
index 20e8d8a..fa29f2f 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_4acb64() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl
index 20e8d8a..fa29f2f 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_4acb64() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl
index beae394..01aa8a1 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_4acb64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_4acb64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_4acb64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl
index 51b9fe8..35052ec 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_4acb64(texture2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm
index b9042cc..0c418eb 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,59 +41,60 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
- %int_1 = OpConstant %int 1
+ %27 = OpConstantNull %uint
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v3int = OpTypeVector %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %42 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_4acb64 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4float %31 %38 Lod %39
- OpStore %res %30
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %38 = OpLoad %uint %arg_2
+ %37 = OpBitcast %int %38
+ %39 = OpCompositeConstruct %v3int %35 %36 %37
+ %40 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4float %32 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_4acb64
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_4acb64
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_4acb64
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_4acb64
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureLoad_4acb64
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_4acb64
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl
index 95aa108..a959800 100644
--- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_4acb64() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
index 2c2af13..fe98496 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
index d6596af..b38c843 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_4db25c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
index d6596af..b38c843 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_4db25c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
index 9c82b7f..831ec04 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_4db25c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_4db25c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_4db25c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
index f6283ca..5bb1794 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_4db25c(depth2d_ms<float, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
index 5e540a9..9894a92 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.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
@@ -40,48 +40,49 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %32 = OpTypeFunction %v4float
+ %33 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_4db25c = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4float %27 %28 Sample %29
- %25 = OpCompositeExtract %float %26 0
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %27 = OpImageFetch %v4float %28 %29 Sample %30
+ %26 = OpCompositeExtract %float %27 0
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_4db25c
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_4db25c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_4db25c
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_4db25c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_4db25c
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_4db25c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
index fd9b07f..5148d2c 100644
--- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
fn textureLoad_4db25c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl
index a028aab..d07e878 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: i32) -> vec4<i32>
fn textureLoad_4fd803() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl
index 6e41378..4388cd3 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_4fd803() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
int4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl
index 6e41378..4388cd3 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_4fd803() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
int4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl
index 4a3b6e7..363fa48 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_4fd803() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_4fd803() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_4fd803() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl
index 3ec7fc1..c659fd7 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_4fd803(texture3d<int, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm
index 1a59a53..53ff43f 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
-%_ptr_Function_v3int = OpTypePointer Function %v3int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %32 = OpConstantNull %v4int
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_4fd803 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %res = OpVariable %_ptr_Function_v4int Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4int %27 %28 Lod %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Lod %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_4fd803
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_4fd803
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_4fd803
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_4fd803
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_4fd803
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_4fd803
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl
index 26a33f0..028a4e9 100644
--- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<i32>;
fn textureLoad_4fd803() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl
index bdf813a..988e28f 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl
index a93753d..684cb98 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_53e142() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl
index a93753d..684cb98 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_53e142() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl
index c0bcb18..76d9c91 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_53e142() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_53e142() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_53e142() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl
index 5bf13f9..a026705 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_53e142(texture2d_array<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int arg_3 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm
index 5d5ccfa..bea8836 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,58 +41,60 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %40 = OpConstantNull %v4uint
- %41 = OpTypeFunction %v4float
+ %42 = OpConstantNull %v4uint
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_53e142 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %40
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %42
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %int %arg_3
- %27 = OpImageFetch %v4uint %29 %36 Lod %37
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %37 = OpLoad %int %arg_2
+ %36 = OpBitcast %uint %37
+ %38 = OpCompositeConstruct %v3uint %34 %35 %36
+ %39 = OpLoad %int %arg_3
+ %29 = OpImageFetch %v4uint %31 %38 Lod %39
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_53e142
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_53e142
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_53e142
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_53e142
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_53e142
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_53e142
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl
index e6a62b7..fd73d38 100644
--- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_53e142() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl
index 36e38cf..abb95bd 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl
index 95f5246..6ab0fca 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_54a59b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl
index 95f5246..6ab0fca 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_54a59b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl
index 30ec30f..2d2fad5 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_54a59b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_54a59b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_54a59b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl
index 54409a0..1319af9 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_54a59b(texture2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int arg_3 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm
index 326d53c..6596d31 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 55
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,58 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %39 = OpTypeFunction %v4float
+ %41 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_54a59b = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %34 = OpLoad %int %arg_2
- %33 = OpBitcast %uint %34
- %35 = OpCompositeConstruct %v3uint %31 %32 %33
- %36 = OpLoad %int %arg_3
- %27 = OpImageFetch %v4float %28 %35 Lod %36
- OpStore %res %27
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %36 = OpLoad %int %arg_2
+ %35 = OpBitcast %uint %36
+ %37 = OpCompositeConstruct %v3uint %33 %34 %35
+ %38 = OpLoad %int %arg_3
+ %29 = OpImageFetch %v4float %30 %37 Lod %38
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_54a59b
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_54a59b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureLoad_54a59b
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_54a59b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_54a59b
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_54a59b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl
index 08cd7ac..ae4ba00 100644
--- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_54a59b() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl
index 7f00367..c3d80b7 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: i32) -> vec4<u32>
fn textureLoad_6154d4() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl
index fa30663..b6fbbac 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_6154d4() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl
index fa30663..b6fbbac 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_6154d4() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl
index fbf9ef4..bab8886 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_6154d4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_6154d4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_6154d4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl
index dbd0040..c3721ca 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_6154d4(texture2d<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm
index a03ba99..7f24091 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_6154d4 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %int %arg_2
+ %27 = OpImageFetch %v4uint %29 %30 Lod %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_6154d4
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_6154d4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_6154d4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_6154d4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_6154d4
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_6154d4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl
index 9be4066..e970a81 100644
--- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<u32>;
fn textureLoad_6154d4() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl
index ed10b36..6f3c159 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl
index b05e1bb..f7ddcb2 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_6273b1() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float res = arg_0.Load(int3(arg_1, 0), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl
index b05e1bb..f7ddcb2 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_6273b1() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float res = arg_0.Load(int3(arg_1, 0), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl
index ae0115f..7a7419c 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6273b1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6273b1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6273b1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
float res = texelFetch(arg_0_1, arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl
index 05fb393..d6b255c 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_6273b1(depth2d_ms<float, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm
index 4ed02fb..a08e42a 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.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
@@ -40,48 +40,49 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %32 = OpTypeFunction %v4float
+ %33 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_6273b1 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4float %27 %28 Sample %29
- %25 = OpCompositeExtract %float %26 0
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %int %arg_2
+ %27 = OpImageFetch %v4float %28 %29 Sample %30
+ %26 = OpCompositeExtract %float %27 0
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_6273b1
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_6273b1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_6273b1
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_6273b1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_6273b1
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_6273b1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl
index 7ef8de4..7cada9a 100644
--- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
fn textureLoad_6273b1() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl
index 2336058..3d14ad5 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
index b349fe4..ed58f3f 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_639962() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
index b349fe4..ed58f3f 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_639962() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
index b273a8c..f5f8da9 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_639962() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_639962() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_639962() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
index bd713c5..c3adfe6 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_639962(texture2d_ms<int, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
index 307a6eb..7057d88 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/639962.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_639962 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Sample %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %uint %arg_2
+ %27 = OpImageFetch %v4int %29 %30 Sample %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_639962
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_639962
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_639962
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_639962
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_639962
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_639962
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
index 25ea34f..c02be59 100644
--- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
fn textureLoad_639962() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl
index 49a1afb..88e3094 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl
index 81de6fa..be46590 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_656d76() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl
index 81de6fa..be46590 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_656d76() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl
index 2eb385b..c22ae85 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_656d76() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_656d76() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_656d76() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl
index 11b7b65..5565e44 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_656d76(texture2d_array<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm
index 2fd38ea..112215f 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,59 +42,60 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %42 = OpConstantNull %v4uint
- %43 = OpTypeFunction %v4float
+ %43 = OpConstantNull %v4uint
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_656d76 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
- %res = OpVariable %_ptr_Function_v4uint Function %42
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %43
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %37 = OpLoad %int %arg_2
- %38 = OpCompositeConstruct %v3int %35 %36 %37
- %39 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4uint %32 %38 Lod %39
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %38 = OpLoad %int %arg_2
+ %39 = OpCompositeConstruct %v3int %36 %37 %38
+ %40 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4uint %33 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_656d76
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_656d76
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_656d76
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_656d76
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_656d76
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_656d76
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl
index 3957ee6..9452773 100644
--- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_656d76() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl
index cf9675b..cddd126 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl
index e21edcd..663ca3a 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_66be47() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl
index e21edcd..663ca3a 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_66be47() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl
index 4aa7bd4..191f682 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_66be47() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_66be47() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_66be47() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl
index e64f0f0..8fefeea 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_66be47(depth2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm
index b97083d..5a3d224 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,57 +41,59 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v3int = OpTypeVector %int 3
%_ptr_Function_float = OpTypePointer Function %float
- %40 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_66be47 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %uint %arg_3
- %28 = OpImageFetch %v4float %29 %36 Lod %37
- %27 = OpCompositeExtract %float %28 0
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %37 = OpLoad %uint %arg_2
+ %36 = OpBitcast %int %37
+ %38 = OpCompositeConstruct %v3int %34 %35 %36
+ %39 = OpLoad %uint %arg_3
+ %30 = OpImageFetch %v4float %31 %38 Lod %39
+ %29 = OpCompositeExtract %float %30 0
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_66be47
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_66be47
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_66be47
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_66be47
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_66be47
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_66be47
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl
index 24d1011..01a2ec9 100644
--- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_66be47() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl
index 975fbb8..51a4254 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl
index 4ce3b6e..86b8281 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_6925bc() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float res = arg_0.Load(int3(arg_1, 0), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl
index 4ce3b6e..86b8281 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_6925bc() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float res = arg_0.Load(int3(arg_1, 0), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl
index 6a5b9c2..baf9efff 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6925bc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6925bc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_6925bc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl
index 5512c42..739dc4a 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_6925bc(depth2d_ms<float, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm
index ce6b52e..dcf7546 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.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
OpMemoryModel Logical GLSL450
@@ -40,49 +40,51 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %33 = OpTypeFunction %v4float
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_6925bc = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %27 = OpImageFetch %v4float %28 %29 Sample %30
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %29 = OpImageFetch %v4float %30 %31 Sample %32
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_6925bc
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_6925bc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_6925bc
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_6925bc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_6925bc
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_6925bc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl
index f673c8f..d399100 100644
--- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
fn textureLoad_6925bc() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl
index 899de73..892cd17 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: u32) -> vec4<u32>
fn textureLoad_6bf4b7() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl
index a18bddf..e35052f 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_6bf4b7() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl
index a18bddf..e35052f 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_6bf4b7() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl
index 710efc8..240d3b6 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_6bf4b7() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_6bf4b7() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_6bf4b7() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl
index 4696cef..e46344f 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_6bf4b7(texture3d<uint, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm
index 78fe0c9..f390c9e 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_6bf4b7 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v3int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_6bf4b7
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_6bf4b7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_6bf4b7
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_6bf4b7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_6bf4b7
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_6bf4b7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl
index e9564fa..697bc95 100644
--- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<u32>;
fn textureLoad_6bf4b7() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
index bd1f65c..18510fd 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: u32) -> vec4<i32>
fn textureLoad_714471() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
index 0c18883..17f1e85 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_714471() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
index 0c18883..17f1e85 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_714471() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
index 2c17c62..ecf3485 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_714471() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_714471() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_714471() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
index d147934..73e4327 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_714471(texture2d<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
index 791435e..f42c3b4 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/714471.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4int
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_714471 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %res = OpVariable %_ptr_Function_v4int Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %uint %arg_2
+ %27 = OpImageFetch %v4int %29 %30 Lod %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_714471
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_714471
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_714471
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_714471
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_714471
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_714471
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
index 6692a20..327caa3 100644
--- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<i32>;
fn textureLoad_714471() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl
index fafee55..d0bdcc2 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl
index ba39885..eac78bd 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_789045() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl
index ba39885..eac78bd 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_789045() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl
index 93e95e9..baf4b50 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_789045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_789045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_789045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl
index 267981b..0d93156 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_789045(texture2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint arg_3 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm
index 6e4a503..aca45c0 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,58 +41,59 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v3int = OpTypeVector %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_789045 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4float %31 %37 Lod %38
- OpStore %res %30
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4float %32 %38 Lod %39
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_789045
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_789045
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_789045
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_789045
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_789045
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_789045
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl
index b1a15dd..865b428 100644
--- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_789045() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl
index ca542b2..37a5c29 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl
index 25d7208..5532fe6 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_79e697() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
int4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl
index 25d7208..5532fe6 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_79e697() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
int4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl
index 5e89dce..2392cd7 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_79e697() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_79e697() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_79e697() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl
index 402b25d..dd36d93 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_79e697(texture2d_array<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int arg_3 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm
index 450bbd2..9d9cb9e 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,57 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %38 = OpConstantNull %v4int
- %39 = OpTypeFunction %v4float
+ %39 = OpConstantNull %v4int
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_79e697 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %24
- %res = OpVariable %_ptr_Function_v4int Function %38
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %39
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %int %arg_3
- %26 = OpImageFetch %v4int %28 %34 Lod %35
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpCompositeExtract %int %31 0
+ %33 = OpCompositeExtract %int %31 1
+ %34 = OpLoad %int %arg_2
+ %35 = OpCompositeConstruct %v3int %32 %33 %34
+ %36 = OpLoad %int %arg_3
+ %27 = OpImageFetch %v4int %29 %35 Lod %36
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_79e697
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_79e697
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureLoad_79e697
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureLoad_79e697
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_79e697
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_79e697
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl
index 9058ac4..bdb2708 100644
--- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_79e697() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl
index 5fe7c16..c1d6e7e 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl
index ec196f0..0ebf675 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_7ab4df() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl
index ec196f0..0ebf675 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_7ab4df() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl
index d1ac243..04a6f05 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7ab4df() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7ab4df() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7ab4df() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl
index 1cacb69..2c10622 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_7ab4df(texture2d_array<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int arg_3 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm
index e118067..a753d7a 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,60 +42,61 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
- %int_1 = OpConstant %int 1
+ %27 = OpConstantNull %uint
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %43 = OpConstantNull %v4uint
- %44 = OpTypeFunction %v4float
+ %44 = OpConstantNull %v4uint
+ %45 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_7ab4df = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %29
- %res = OpVariable %_ptr_Function_v4uint Function %43
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %44
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %38 = OpLoad %uint %arg_2
- %37 = OpBitcast %int %38
- %39 = OpCompositeConstruct %v3int %35 %36 %37
- %40 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4uint %32 %39 Lod %40
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4uint %33 %40 Lod %41
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_7ab4df
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_7ab4df
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_7ab4df
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_7ab4df
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureLoad_7ab4df
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureLoad_7ab4df
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl
index f4aa72e..a11042c 100644
--- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_7ab4df() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
index 19901a0..a3ef4db 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
index 54f384a..7c6acb6 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_7b63e0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
index 54f384a..7c6acb6 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_7b63e0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
index a024f9c..c9a432b 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_7b63e0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_7b63e0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_7b63e0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
index 31ac2eb..dc75d16 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_7b63e0(depth2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
index ae0386b..2409080 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,55 +41,56 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v3uint = OpTypeVector %uint 3
%_ptr_Function_float = OpTypePointer Function %float
- %38 = OpTypeFunction %v4float
+ %39 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_7b63e0 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %uint %arg_3
- %27 = OpImageFetch %v4float %28 %34 Lod %35
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpCompositeExtract %uint %31 0
+ %33 = OpCompositeExtract %uint %31 1
+ %34 = OpLoad %uint %arg_2
+ %35 = OpCompositeConstruct %v3uint %32 %33 %34
+ %36 = OpLoad %uint %arg_3
+ %28 = OpImageFetch %v4float %29 %35 Lod %36
+ %27 = OpCompositeExtract %float %28 0
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_7b63e0
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_7b63e0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureLoad_7b63e0
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_7b63e0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_7b63e0
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_7b63e0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
index 6839f8c..c888b5a 100644
--- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_7b63e0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl
index d6db0ca..4c32497 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl
index d9e0566..31352a9 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_7bee94() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl
index d9e0566..31352a9 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_7bee94() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl
index e876cbe..424a6ef 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_7bee94() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_7bee94() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_7bee94() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl
index 19eca23..0f5165f 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_7bee94(texture2d_ms<int, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm
index e191d64..3018fee 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_7bee94 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4int %28 %29 Sample %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Sample %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_7bee94
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_7bee94
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_7bee94
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_7bee94
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_7bee94
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_7bee94
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl
index 7cc012f..ef3b813 100644
--- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
fn textureLoad_7bee94() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl
index e27eaa7..c2ea7d2 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl
index 8ba2978..d017a03 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_7c90e5() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl
index 8ba2978..d017a03 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_7c90e5() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl
index 4be88a2..cbc50b7 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7c90e5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7c90e5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_7c90e5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl
index d84b8ed..126dc80 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_7c90e5(texture2d_array<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int arg_3 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm
index 37a98bf..73dae19 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 55
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,56 +42,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %39 = OpConstantNull %v4uint
- %40 = OpTypeFunction %v4float
+ %40 = OpConstantNull %v4uint
+ %41 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_7c90e5 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %39
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_int Function %26
+ %res = OpVariable %_ptr_Function_v4uint Function %40
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %34 = OpLoad %int %arg_2
- %35 = OpCompositeConstruct %v3int %32 %33 %34
- %36 = OpLoad %int %arg_3
- %27 = OpImageFetch %v4uint %29 %35 Lod %36
- OpStore %res %27
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpCompositeExtract %int %32 0
+ %34 = OpCompositeExtract %int %32 1
+ %35 = OpLoad %int %arg_2
+ %36 = OpCompositeConstruct %v3int %33 %34 %35
+ %37 = OpLoad %int %arg_3
+ %28 = OpImageFetch %v4uint %30 %36 Lod %37
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_7c90e5
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_7c90e5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_7c90e5
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_7c90e5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_7c90e5
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_7c90e5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl
index d6a9286..e4c7106 100644
--- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_7c90e5() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl
index 40c0104..7d7c93a 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: i32) -> f32
fn textureLoad_7fd822() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl
index 56cd912..3fbe2bb 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_7fd822() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float res = arg_0.Load(uint3(arg_1, uint(arg_2))).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl
index 56cd912..3fbe2bb 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_7fd822() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float res = arg_0.Load(uint3(arg_1, uint(arg_2))).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl
index 5525b53..0b1843c 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_7fd822() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_7fd822() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_7fd822() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl
index fbc1807c..7b23746 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_7fd822(depth2d<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm
index dcd33ae..ded61b9 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.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
OpMemoryModel Logical GLSL450
@@ -40,49 +40,51 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %33 = OpTypeFunction %v4float
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_7fd822 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %27 = OpImageFetch %v4float %28 %29 Lod %30
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %29 = OpImageFetch %v4float %30 %31 Lod %32
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_7fd822
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_7fd822
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_7fd822
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_7fd822
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_7fd822
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_7fd822
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl
index 90a4a66..64bd80e 100644
--- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d;
fn textureLoad_7fd822() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
index 4ef1d0b..b9a6c49 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<f32>, coords: vec2<u32>, level: u32) -> vec4<f32>
fn textureLoad_84dee1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
index 7ab5799..ddbcaca 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_84dee1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
index 7ab5799..ddbcaca 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_84dee1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
index 6706ec1..0cf1692 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_84dee1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_84dee1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_84dee1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
index 545f668..c2a83c6 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_84dee1(texture2d<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
index d1c06a6..8126b56 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_84dee1 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4float %26 %27 Lod %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2uint %arg_1
+ %29 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Lod %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_84dee1
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_84dee1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_84dee1
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_84dee1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_84dee1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_84dee1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
index 850b0fe..20c09d3 100644
--- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<f32>;
fn textureLoad_84dee1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
index 3e96430..9bcc0f9 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
index e084b64..a8eedff 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_8527b1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
index e084b64..a8eedff 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_8527b1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
index 01a6c24..3a7abdc 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_8527b1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_8527b1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_8527b1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
index c84a237..b8f246d 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_8527b1(texture2d_array<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
index e8edef0..7894494 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,57 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %38 = OpConstantNull %v4uint
- %39 = OpTypeFunction %v4float
+ %39 = OpConstantNull %v4uint
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_8527b1 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %24
- %res = OpVariable %_ptr_Function_v4uint Function %38
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %39
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %uint %arg_3
- %26 = OpImageFetch %v4uint %28 %34 Lod %35
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpCompositeExtract %uint %31 0
+ %33 = OpCompositeExtract %uint %31 1
+ %34 = OpLoad %uint %arg_2
+ %35 = OpCompositeConstruct %v3uint %32 %33 %34
+ %36 = OpLoad %uint %arg_3
+ %27 = OpImageFetch %v4uint %29 %35 Lod %36
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_8527b1
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_8527b1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureLoad_8527b1
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureLoad_8527b1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_8527b1
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_8527b1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
index 2f2f110..68a89fe 100644
--- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_8527b1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl
index 9f3e2bc..703671b 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl
index 4957401..e2e2ecc 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_87be85() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
float4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl
index 4957401..e2e2ecc 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_87be85() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
float4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl
index 3bea7e30..46621b3 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_87be85() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_87be85() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_87be85() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl
index c0f13cf..5c043b9 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_87be85(texture2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int arg_3 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm
index aebef8a..fa7cb5c 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 51
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,55 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v3int = OpTypeVector %int 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %37 = OpTypeFunction %v4float
+ %38 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_87be85 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %27 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpCompositeExtract %int %29 0
- %31 = OpCompositeExtract %int %29 1
- %32 = OpLoad %int %arg_2
- %33 = OpCompositeConstruct %v3int %30 %31 %32
- %34 = OpLoad %int %arg_3
- %26 = OpImageFetch %v4float %27 %33 Lod %34
- OpStore %res %26
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpCompositeExtract %int %30 0
+ %32 = OpCompositeExtract %int %30 1
+ %33 = OpLoad %int %arg_2
+ %34 = OpCompositeConstruct %v3int %31 %32 %33
+ %35 = OpLoad %int %arg_3
+ %27 = OpImageFetch %v4float %28 %34 Lod %35
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %37
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureLoad_87be85
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_87be85
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %42 = OpLabel
- %43 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %43
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_87be85
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_87be85
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_87be85
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_87be85
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl
index a98432a..79c6137 100644
--- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_87be85() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
index cf0ac23..d2e7b87 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: u32) -> vec4<u32>
fn textureLoad_897cf3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
index 7f68c6d..e943ee4 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_897cf3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
index 7f68c6d..e943ee4 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_897cf3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(uint3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
index 4c8f3f2..603face 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_897cf3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_897cf3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_897cf3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
index 004547d..4ebbf9b 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_897cf3(texture2d<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
index 43e8cfb..b62cf69 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %32 = OpConstantNull %v4uint
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_897cf3 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %res = OpVariable %_ptr_Function_v4uint Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %res = OpVariable %_ptr_Function_v4uint Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %uint %arg_2
- %25 = OpImageFetch %v4uint %27 %28 Lod %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %26 = OpImageFetch %v4uint %28 %29 Lod %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_897cf3
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_897cf3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_897cf3
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_897cf3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_897cf3
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_897cf3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
index a690f92..5739639 100644
--- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<u32>;
fn textureLoad_897cf3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl
index fe47513..4fd4ae8 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_external, coords: vec2<i32>) -> vec4<f32>
fn textureLoad_8acf41() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var res: vec4<f32> = textureLoad(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
index 4661657..6b42460 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl
@@ -80,7 +80,7 @@
}
void textureLoad_8acf41() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
index 4661657..6b42460 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl
@@ -80,7 +80,7 @@
}
void textureLoad_8acf41() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl
index e81af14..0a17c67 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/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() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
@@ -118,7 +118,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
void textureLoad_8acf41() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
@@ -181,7 +181,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D ext_tex_plane_1_1;
void textureLoad_8acf41() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl
index d6fff77..8806d2f 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
index 350a201..41ba458 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 141
+; Bound: 143
; Schema: 0
OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450"
@@ -115,12 +115,14 @@
%93 = OpConstantNull %uint
%void = OpTypeVoid
%111 = OpTypeFunction %void
- %115 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %116 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %119 = OpConstantNull %v2int
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %128 = OpTypeFunction %v4float
+ %130 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %22
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@@ -214,37 +216,37 @@
OpFunctionEnd
%textureLoad_8acf41 = OpFunction %void None %111
%114 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %115
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %119
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %115
- %119 = OpLoad %11 %arg_0
- %120 = OpLoad %11 %ext_tex_plane_1
- %121 = OpLoad %v2int %arg_1
- %124 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
- %125 = OpLoad %ExternalTextureParams %124
- %118 = OpFunctionCall %v4float %textureLoadExternal %119 %120 %121 %125
- OpStore %res %118
+ OpStore %arg_1 %116
+ %121 = OpLoad %11 %arg_0
+ %122 = OpLoad %11 %ext_tex_plane_1
+ %123 = OpLoad %v2int %arg_1
+ %126 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %127 = OpLoad %ExternalTextureParams %126
+ %120 = OpFunctionCall %v4float %textureLoadExternal %121 %122 %123 %127
+ OpStore %res %120
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %128
- %130 = OpLabel
- %131 = OpFunctionCall %void %textureLoad_8acf41
+%vertex_main_inner = OpFunction %v4float None %130
+ %132 = OpLabel
+ %133 = OpFunctionCall %void %textureLoad_8acf41
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %111
- %133 = OpLabel
- %134 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %134
+ %135 = OpLabel
+ %136 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %136
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %111
- %136 = OpLabel
- %137 = OpFunctionCall %void %textureLoad_8acf41
+ %138 = OpLabel
+ %139 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %111
- %139 = OpLabel
- %140 = OpFunctionCall %void %textureLoad_8acf41
+ %141 = OpLabel
+ %142 = OpFunctionCall %void %textureLoad_8acf41
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl
index 09bc012..90bedea 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_external;
fn textureLoad_8acf41() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var res : vec4<f32> = textureLoad(arg_0, arg_1);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl
index 63dcd78..4db4f0f 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: u32) -> f32
fn textureLoad_8ccbe3() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl
index 5eb8359..cfaa745 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_8ccbe3() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float res = arg_0.Load(int3(arg_1, int(arg_2))).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl
index 5eb8359..cfaa745 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_8ccbe3() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float res = arg_0.Load(int3(arg_1, int(arg_2))).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl
index b4a68c5..658298a 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_8ccbe3() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_8ccbe3() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_8ccbe3() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl
index 0dcde10..c2a25ed 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_8ccbe3(depth2d<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm
index fdd0962..28a28a5 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.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
OpMemoryModel Logical GLSL450
@@ -40,49 +40,51 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %33 = OpTypeFunction %v4float
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_8ccbe3 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %27 = OpImageFetch %v4float %28 %29 Lod %30
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %29 = OpImageFetch %v4float %30 %31 Lod %32
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_8ccbe3
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_8ccbe3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_8ccbe3
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_8ccbe3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_8ccbe3
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_8ccbe3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl
index 570441e..0277d7e 100644
--- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d;
fn textureLoad_8ccbe3() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl
index 3b82476..cf4aad9 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<u32>, coords: vec3<u32>, level: i32) -> vec4<u32>
fn textureLoad_92eb1f() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl
index a369376..fc35c27 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_92eb1f() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
uint4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl
index a369376..fc35c27 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_92eb1f() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
uint4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl
index 6784cfe..50d73c1 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_92eb1f() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_92eb1f() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_92eb1f() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl
index b31aa86..d6f31ed 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_92eb1f(texture3d<uint, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm
index 279e593..185df10 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %22 = OpConstantNull %v3uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_92eb1f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v3uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_92eb1f
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_92eb1f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_92eb1f
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_92eb1f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_92eb1f
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_92eb1f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl
index 4a8be7f..8180d4b 100644
--- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<u32>;
fn textureLoad_92eb1f() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
index 7dd1032..a7c6f4c 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
index 06c757a..f4d0e5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_96efd5() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
index 06c757a..f4d0e5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_96efd5() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
index 1949301..6503ab3 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_96efd5() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_96efd5() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_96efd5() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
index 56325e3..2ab66e7 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_96efd5(texture2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
index 7529e7e..296c3a2 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 51
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,55 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %37 = OpTypeFunction %v4float
+ %38 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_96efd5 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %27 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpCompositeExtract %uint %29 0
- %31 = OpCompositeExtract %uint %29 1
- %32 = OpLoad %uint %arg_2
- %33 = OpCompositeConstruct %v3uint %30 %31 %32
- %34 = OpLoad %uint %arg_3
- %26 = OpImageFetch %v4float %27 %33 Lod %34
- OpStore %res %26
+ %28 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpCompositeExtract %uint %30 0
+ %32 = OpCompositeExtract %uint %30 1
+ %33 = OpLoad %uint %arg_2
+ %34 = OpCompositeConstruct %v3uint %31 %32 %33
+ %35 = OpLoad %uint %arg_3
+ %27 = OpImageFetch %v4float %28 %34 Lod %35
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %37
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureLoad_96efd5
+%vertex_main_inner = OpFunction %v4float None %38
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureLoad_96efd5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %42 = OpLabel
- %43 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %43
+ %43 = OpLabel
+ %44 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %44
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_96efd5
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_96efd5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_96efd5
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_96efd5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
index 1dd4f6c..11a80a3 100644
--- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_96efd5() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
index 61e56bd..d762cb6 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
index 70b8ef5..a6ce9eb 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9885b0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
index 70b8ef5..a6ce9eb 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9885b0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
index 6ecf66c..65bdb59 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9885b0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9885b0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9885b0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
index 2f75ea8..58b45be 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9885b0(texture2d_array<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
index 6faf53b..bae79ed 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 55
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,56 +42,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %39 = OpConstantNull %v4int
- %40 = OpTypeFunction %v4float
+ %40 = OpConstantNull %v4int
+ %41 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9885b0 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %39
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_uint Function %26
+ %res = OpVariable %_ptr_Function_v4int Function %40
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %34 = OpLoad %uint %arg_2
- %35 = OpCompositeConstruct %v3uint %32 %33 %34
- %36 = OpLoad %uint %arg_3
- %27 = OpImageFetch %v4int %29 %35 Lod %36
- OpStore %res %27
+ %30 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpCompositeExtract %uint %32 0
+ %34 = OpCompositeExtract %uint %32 1
+ %35 = OpLoad %uint %arg_2
+ %36 = OpCompositeConstruct %v3uint %33 %34 %35
+ %37 = OpLoad %uint %arg_3
+ %28 = OpImageFetch %v4int %30 %36 Lod %37
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_9885b0
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_9885b0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_9885b0
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureLoad_9885b0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_9885b0
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_9885b0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
index 0ac0400..a7fa0f5 100644
--- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_9885b0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl
index 8e27058..9311ce9 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<i32>, coords: vec2<u32>, level: i32) -> vec4<i32>
fn textureLoad_9aa733() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl
index 34e1a1c..25e382b 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_9aa733() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl
index 34e1a1c..25e382b 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_9aa733() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl
index cec5f4b..1681f07 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_9aa733() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_9aa733() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_9aa733() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl
index 31eb5f5..4afc04a 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9aa733(texture2d<int, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm
index 1c67aef..4e86f2f 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9aa733 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_9aa733
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_9aa733
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_9aa733
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_9aa733
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_9aa733
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_9aa733
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl
index 2b8e1a8..26e1377 100644
--- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<i32>;
fn textureLoad_9aa733() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl
index d9e6797..f471aef 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl
index e2a1981..9376a83 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_9b2667() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
float res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl
index e2a1981..9376a83 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_9b2667() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int arg_3 = 1;
float res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl
index b234f6f..b488ee0 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_9b2667() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_9b2667() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_9b2667() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl
index 6db3ff1..8208bb5 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9b2667(depth2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int arg_3 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm
index 7ceb14a..f42aff6 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,55 +41,56 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v3int = OpTypeVector %int 3
%_ptr_Function_float = OpTypePointer Function %float
- %38 = OpTypeFunction %v4float
+ %39 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9b2667 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %int %arg_3
- %27 = OpImageFetch %v4float %28 %34 Lod %35
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpCompositeExtract %int %31 0
+ %33 = OpCompositeExtract %int %31 1
+ %34 = OpLoad %int %arg_2
+ %35 = OpCompositeConstruct %v3int %32 %33 %34
+ %36 = OpLoad %int %arg_3
+ %28 = OpImageFetch %v4float %29 %35 Lod %36
+ %27 = OpCompositeExtract %float %28 0
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_9b2667
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_9b2667
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureLoad_9b2667
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_9b2667
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_9b2667
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_9b2667
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl
index 4c86d49..9da65be 100644
--- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_9b2667() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl
index 530c1e1..b610e53 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl
index 3a3134e..e7d5bc4 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9d70e9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl
index 3a3134e..e7d5bc4 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9d70e9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl
index 65a8f74..d3f7231 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9d70e9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9d70e9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9d70e9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl
index 0bbe65d..f374faa 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9d70e9(texture2d_array<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint arg_3 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm
index d0c1157..dcd5718 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,60 +41,61 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %42 = OpConstantNull %v4int
- %43 = OpTypeFunction %v4float
+ %43 = OpConstantNull %v4int
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9d70e9 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
- %res = OpVariable %_ptr_Function_v4int Function %42
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %43
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %37 = OpLoad %int %arg_2
- %38 = OpCompositeConstruct %v3int %35 %36 %37
- %39 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4int %32 %38 Lod %39
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %38 = OpLoad %int %arg_2
+ %39 = OpCompositeConstruct %v3int %36 %37 %38
+ %40 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4int %33 %39 Lod %40
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_9d70e9
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_9d70e9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_9d70e9
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_9d70e9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_9d70e9
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_9d70e9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl
index 6732768..ea77eb9 100644
--- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_9d70e9() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
index 48c2b12..9db0b27 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_depth_2d, coords: vec2<u32>, level: u32) -> f32
fn textureLoad_9ed19e() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
index 90bb9c3..37dbf5f 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_9ed19e() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float res = arg_0.Load(uint3(arg_1, arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
index 90bb9c3..37dbf5f 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_9ed19e() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
float res = arg_0.Load(uint3(arg_1, arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
index 43575c6..6cb2a0e 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_9ed19e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_9ed19e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
void textureLoad_9ed19e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
index e85b151..cea169f 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9ed19e(depth2d<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
index aa66bcb..3e84bf3 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.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
@@ -40,48 +40,49 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %32 = OpTypeFunction %v4float
+ %33 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9ed19e = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- %25 = OpCompositeExtract %float %26 0
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %uint %arg_2
+ %27 = OpImageFetch %v4float %28 %29 Lod %30
+ %26 = OpCompositeExtract %float %27 0
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_9ed19e
+%vertex_main_inner = OpFunction %v4float None %33
+ %35 = OpLabel
+ %36 = OpFunctionCall %void %textureLoad_9ed19e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_9ed19e
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureLoad_9ed19e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_9ed19e
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_9ed19e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
index b50d5ff..3a370c0 100644
--- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d;
fn textureLoad_9ed19e() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl
index 02530d2..b58b2f9 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl
index 6878a77..d289237 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9fbfd9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl
index 6878a77..d289237 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_9fbfd9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl
index 805dfe5..e5225ef 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9fbfd9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9fbfd9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_9fbfd9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl
index 89526cc..e51e7d4 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_9fbfd9(texture2d_array<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint arg_3 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm
index f5b5c54..66ff86b 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,58 +41,60 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %40 = OpConstantNull %v4int
- %41 = OpTypeFunction %v4float
+ %42 = OpConstantNull %v4int
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_9fbfd9 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %40
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %42
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %uint_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %uint %arg_3
- %27 = OpImageFetch %v4int %29 %36 Lod %37
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %37 = OpLoad %uint %arg_2
+ %36 = OpBitcast %int %37
+ %38 = OpCompositeConstruct %v3int %34 %35 %36
+ %39 = OpLoad %uint %arg_3
+ %29 = OpImageFetch %v4int %31 %38 Lod %39
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_9fbfd9
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_9fbfd9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_9fbfd9
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_9fbfd9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_9fbfd9
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_9fbfd9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl
index 17e197a..2296540 100644
--- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_9fbfd9() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl
index db3610e..948a8bd 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl
index e5c26fb..077a798 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_a24be1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl
index e5c26fb..077a798 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_a24be1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl
index 6f0bc3f..1fcbb32 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_a24be1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -26,7 +26,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_a24be1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
@@ -44,7 +44,7 @@
uniform highp usampler2DArray arg_0_1;
void textureLoad_a24be1() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl
index 062190a..8bceee3 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_a24be1(texture2d_array<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint arg_3 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm
index 71d425b..a6228e3 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,61 +41,62 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
- %uint_1 = OpConstant %uint 1
+ %27 = OpConstantNull %int
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %43 = OpConstantNull %v4uint
- %44 = OpTypeFunction %v4float
+ %44 = OpConstantNull %v4uint
+ %45 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_a24be1 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
- %res = OpVariable %_ptr_Function_v4uint Function %43
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
+ %res = OpVariable %_ptr_Function_v4uint Function %44
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %38 = OpLoad %int %arg_2
- %37 = OpBitcast %uint %38
- %39 = OpCompositeConstruct %v3uint %35 %36 %37
- %40 = OpLoad %uint %arg_3
- %30 = OpImageFetch %v4uint %32 %39 Lod %40
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %uint %arg_3
+ %31 = OpImageFetch %v4uint %33 %40 Lod %41
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_a24be1
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_a24be1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_a24be1
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_a24be1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureLoad_a24be1
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureLoad_a24be1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl
index 024ec51..e321579 100644
--- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
fn textureLoad_a24be1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl
index 185b1bb..0692104 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl
index c8c40f9..cf72504 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_a583c9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl
index c8c40f9..cf72504 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_a583c9() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl
index 2d7faec..cd79930 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_a583c9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_a583c9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_a583c9() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl
index 666d009..285b756 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_a583c9(texture2d_ms<float, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm
index c9e24f9..b62cc21 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.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
@@ -40,47 +40,48 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %31 = OpTypeFunction %v4float
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_a583c9 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4float %26 %27 Sample %28
- OpStore %res %25
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %v2int %arg_1
+ %29 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4float %27 %28 Sample %29
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
- %33 = OpLabel
- %34 = OpFunctionCall %void %textureLoad_a583c9
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureLoad_a583c9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %36 = OpLabel
- %37 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %37
+ %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
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureLoad_a583c9
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureLoad_a583c9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_a583c9
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_a583c9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl
index 8a73dde..bae2e0d 100644
--- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
fn textureLoad_a583c9() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl
index dde727d..8769abe 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: i32) -> vec4<u32>
fn textureLoad_a9a9f5() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl
index 2d066b2..e3ec6e8 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_a9a9f5() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
uint4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl
index 2d066b2..e3ec6e8 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_a9a9f5() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
int arg_2 = 1;
uint4 res = arg_0.Load(int4(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl
index bc87058..cfa42c4 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_a9a9f5() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_a9a9f5() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler3D arg_0_1;
void textureLoad_a9a9f5() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl
index 7362d1e..dd765b4 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_a9a9f5(texture3d<uint, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm
index 30a1913..51d5467 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
-%_ptr_Function_v3int = OpTypePointer Function %v3int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_a9a9f5 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3int %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %int %arg_2
+ %27 = OpImageFetch %v4uint %29 %30 Lod %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_a9a9f5
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_a9a9f5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_a9a9f5
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_a9a9f5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_a9a9f5
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_a9a9f5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl
index 6c0be9b..3b9b743 100644
--- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<u32>;
fn textureLoad_a9a9f5() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl
index 0160d1b..7030cca 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl
index 5f94bd4..eb30fed 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_b29f71() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl
index 5f94bd4..eb30fed 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_b29f71() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3));
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl
index 5ee7aa6..85fdeb5 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_b29f71() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_b29f71() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp isampler2DArray arg_0_1;
void textureLoad_b29f71() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl
index 223e7ec..2900129 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_b29f71(texture2d_array<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int arg_3 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm
index b410a5b..b72126d 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 59
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,61 +41,62 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
- %int_1 = OpConstant %int 1
+ %27 = OpConstantNull %uint
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%v3int = OpTypeVector %int 3
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %43 = OpConstantNull %v4int
- %44 = OpTypeFunction %v4float
+ %44 = OpConstantNull %v4int
+ %45 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_b29f71 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %29
- %res = OpVariable %_ptr_Function_v4int Function %43
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
+ %res = OpVariable %_ptr_Function_v4int Function %44
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %38 = OpLoad %uint %arg_2
- %37 = OpBitcast %int %38
- %39 = OpCompositeConstruct %v3int %35 %36 %37
- %40 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4int %32 %39 Lod %40
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4int %33 %40 Lod %41
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %44
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_b29f71
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_b29f71
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %50
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_b29f71
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_b29f71
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureLoad_b29f71
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureLoad_b29f71
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl
index 4e61327..fe9529b 100644
--- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
fn textureLoad_b29f71() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl
index aa852d0..04014e1 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl
index 3be54d2..3cf192a 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_b6ba5d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl
index 3be54d2..3cf192a 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_b6ba5d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
int arg_3 = 1;
float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl
index 47755bc..551eb08 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_b6ba5d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_b6ba5d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_b6ba5d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl
index fa0087d..5a97ce5 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_b6ba5d(depth2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
int arg_3 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm
index 836e869..f2a68b4 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,57 +41,59 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v3uint = OpTypeVector %uint 3
%_ptr_Function_float = OpTypePointer Function %float
- %40 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_b6ba5d = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %int_1
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %int %arg_3
- %28 = OpImageFetch %v4float %29 %36 Lod %37
- %27 = OpCompositeExtract %float %28 0
- OpStore %res %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %37 = OpLoad %int %arg_2
+ %36 = OpBitcast %uint %37
+ %38 = OpCompositeConstruct %v3uint %34 %35 %36
+ %39 = OpLoad %int %arg_3
+ %30 = OpImageFetch %v4float %31 %38 Lod %39
+ %29 = OpCompositeExtract %float %30 0
+ OpStore %res %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_b6ba5d
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_b6ba5d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureLoad_b6ba5d
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_b6ba5d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_b6ba5d
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_b6ba5d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl
index a22310a..626f638 100644
--- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_b6ba5d() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var arg_3 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl
index af3e125..19912f4 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<u32>, coords: vec2<u32>, level: i32) -> vec4<u32>
fn textureLoad_b73f6b() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl
index b67edf5..9d88185 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_b73f6b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl
index b67edf5..9d88185 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_b73f6b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(uint3(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl
index cf211c3..12f1e43 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_b73f6b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_b73f6b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_b73f6b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl
index a906716..bc90f5e 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_b73f6b(texture2d<uint, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm
index f2fe743..b6c79a0 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_b73f6b = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_b73f6b
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_b73f6b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_b73f6b
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_b73f6b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_b73f6b
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_b73f6b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl
index 30acfd9..5af4ac7 100644
--- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<u32>;
fn textureLoad_b73f6b() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl
index c456a66..23f0bbc 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl
index eb82033..74c096e 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_b75d4a() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl
index eb82033..74c096e 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_b75d4a() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl
index 5cd617e..adef08f 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_b75d4a() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_b75d4a() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_b75d4a() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl
index 455295b..f58711f 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_b75d4a(texture2d_ms<float, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm
index fab352d..8c13159 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_b75d4a = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4float %27 %28 Sample %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Sample %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_b75d4a
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_b75d4a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_b75d4a
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_b75d4a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_b75d4a
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_b75d4a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl
index ac0a4a0..6117807 100644
--- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
fn textureLoad_b75d4a() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl
index 06c515e..3833450 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<f32>, coords: vec3<u32>, level: i32) -> vec4<f32>
fn textureLoad_bcbb3c() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl
index 4f12d01..b196d9f 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_bcbb3c() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
float4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl
index 4f12d01..b196d9f 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_bcbb3c() {
- uint3 arg_1 = (0u).xxx;
+ uint3 arg_1 = (1u).xxx;
int arg_2 = 1;
float4 res = arg_0.Load(uint4(arg_1, uint(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl
index d0bf75e..8f1cef3 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_bcbb3c() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_bcbb3c() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler3D arg_0_1;
void textureLoad_bcbb3c() {
- uvec3 arg_1 = uvec3(0u);
+ uvec3 arg_1 = uvec3(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl
index 1a13015..fbd76f6 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_bcbb3c(texture3d<float, access::sample> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
+ uint3 arg_1 = uint3(1u);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm
index 85bba68..562f9f7 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %22 = OpConstantNull %v3uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_bcbb3c = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4float %27 %28 Lod %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3uint %arg_1
+ %31 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Lod %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_bcbb3c
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_bcbb3c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_bcbb3c
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_bcbb3c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_bcbb3c
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_bcbb3c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl
index 572a57c..23be829 100644
--- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<f32>;
fn textureLoad_bcbb3c() {
- var arg_1 = vec3<u32>();
+ var arg_1 = vec3<u32>(1u);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl
index 8f83aff..ed1b9a9 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl
index 4d0f985..03e9cf6 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_c16e00() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl
index 4d0f985..03e9cf6 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_c16e00() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl
index 31617d9..674994b 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_c16e00() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_c16e00() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_c16e00() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl
index bd6dd7b..3b8aab4 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_c16e00(depth2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int arg_3 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm
index d564db6..a50dacf 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 57
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,60 +41,61 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
- %int_1 = OpConstant %int 1
+ %27 = OpConstantNull %uint
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v3int = OpTypeVector %int 3
%_ptr_Function_float = OpTypePointer Function %float
- %43 = OpTypeFunction %v4float
+ %44 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_c16e00 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %38 = OpLoad %uint %arg_2
- %37 = OpBitcast %int %38
- %39 = OpCompositeConstruct %v3int %35 %36 %37
- %40 = OpLoad %int %arg_3
- %31 = OpImageFetch %v4float %32 %39 Lod %40
- %30 = OpCompositeExtract %float %31 0
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %int %arg_3
+ %32 = OpImageFetch %v4float %33 %40 Lod %41
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %43
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_c16e00
+%vertex_main_inner = OpFunction %v4float None %44
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_c16e00
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %49
+ %49 = OpLabel
+ %50 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %50
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureLoad_c16e00
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureLoad_c16e00
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureLoad_c16e00
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureLoad_c16e00
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl
index 766c6ef..f9aff39 100644
--- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_c16e00() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var arg_3 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl
index dcb27eb..5c4a300 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: i32) -> vec4<i32>
fn textureLoad_c2a480() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl
index dcfad55..24a7ffa 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_c2a480() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl
index dcfad55..24a7ffa 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_c2a480() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int4 res = arg_0.Load(int3(arg_1, arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl
index 8002bc0c..199eecb 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_c2a480() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_c2a480() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_c2a480() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl
index 0d6cf6e..3daa6a0 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_c2a480(texture2d<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm
index dbd659d..cb4beee 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %32 = OpConstantNull %v4int
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_c2a480 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %res = OpVariable %_ptr_Function_v4int Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4int %27 %28 Lod %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Lod %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_c2a480
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_c2a480
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_c2a480
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_c2a480
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_c2a480
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_c2a480
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl
index 569a41b..f7bac9a 100644
--- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<i32>;
fn textureLoad_c2a480() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl
index 9c585ac..091e0e5 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl
index 20193da..2df89369 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_c378ee() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl
index 20193da..2df89369 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_c378ee() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl
index 9d3f844..e8e7b4c 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_c378ee() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_c378ee() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_c378ee() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl
index c6192ce..a8df92b 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_c378ee(texture2d_ms<uint, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm
index 190f4ac..808c4e6 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.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
@@ -41,49 +41,50 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %34 = OpConstantNull %v4uint
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_c378ee = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %res = OpVariable %_ptr_Function_v4uint Function %34
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Sample %30
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %int %arg_2
+ %27 = OpImageFetch %v4uint %29 %30 Sample %31
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_c378ee
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_c378ee
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %40
+ %40 = OpLabel
+ %41 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %41
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_c378ee
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_c378ee
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_c378ee
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_c378ee
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl
index fa00435..33e2b06 100644
--- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
fn textureLoad_c378ee() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl
index 16f8e3e..67b4f75 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl
index b6f32e6..c00b762 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_cad5f2() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl
index b6f32e6..c00b762 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_cad5f2() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl
index 97b57af..e448cbd 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_cad5f2() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_cad5f2() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_cad5f2() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl
index c06c0c6..732b1a9 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_cad5f2(texture2d_ms<uint, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm
index d95ecf3..43f5fa2 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_cad5f2 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Sample %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Sample %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_cad5f2
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_cad5f2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_cad5f2
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_cad5f2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_cad5f2
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_cad5f2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl
index 5d3a522..05c2787 100644
--- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
fn textureLoad_cad5f2() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl
index e34e2a9..5aee221 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl
index 135cccf..9ec09f6 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_cb57c2() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl
index 135cccf..9ec09f6 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_cb57c2() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl
index 4a373bd..e0f0550 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_cb57c2() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_cb57c2() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_cb57c2() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl
index 266af5b..c92ea65 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_cb57c2(depth2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm
index 5475379..83f4137 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,59 +41,60 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v3uint = OpTypeVector %uint 3
%_ptr_Function_float = OpTypePointer Function %float
- %42 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_cb57c2 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2uint %arg_1
- %35 = OpCompositeExtract %uint %34 0
- %36 = OpCompositeExtract %uint %34 1
- %37 = OpLoad %uint %arg_2
- %38 = OpCompositeConstruct %v3uint %35 %36 %37
- %39 = OpLoad %int %arg_3
- %31 = OpImageFetch %v4float %32 %38 Lod %39
- %30 = OpCompositeExtract %float %31 0
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %38 = OpLoad %uint %arg_2
+ %39 = OpCompositeConstruct %v3uint %36 %37 %38
+ %40 = OpLoad %int %arg_3
+ %32 = OpImageFetch %v4float %33 %39 Lod %40
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_cb57c2
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_cb57c2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_cb57c2
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_cb57c2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureLoad_cb57c2
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_cb57c2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl
index 6bedb93..8c9f2ac 100644
--- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_cb57c2() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl
index 619901a..f53b198 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: u32) -> vec4<i32>
fn textureLoad_e35f72() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl
index 0a1558f..9e661e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_e35f72() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
int4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl
index 0a1558f..9e661e2 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_e35f72() {
- int3 arg_1 = (0).xxx;
+ int3 arg_1 = (1).xxx;
uint arg_2 = 1u;
int4 res = arg_0.Load(int4(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl
index b1d0f09..3a88a78 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_e35f72() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_e35f72() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler3D arg_0_1;
void textureLoad_e35f72() {
- ivec3 arg_1 = ivec3(0);
+ ivec3 arg_1 = ivec3(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl
index faa6c6b..978bd25 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_e35f72(texture3d<int, access::sample> tint_symbol_1) {
- int3 arg_1 = int3(0);
+ int3 arg_1 = int3(1);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm
index 64cc79d..e6502f1 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_e35f72 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v3int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v3int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_e35f72
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_e35f72
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_e35f72
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_e35f72
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_e35f72
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_e35f72
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl
index bd4853b..b1df17e 100644
--- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_3d<i32>;
fn textureLoad_e35f72() {
- var arg_1 = vec3<i32>();
+ var arg_1 = vec3<i32>(1i);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl
index a2b9f55..8f380a4 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl
index 2599303..0037606 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_e3d2cc() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl
index 2599303..0037606 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<int4> arg_0 : register(t0, space1);
void textureLoad_e3d2cc() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
int4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl
index 6c70fb2..584ca2a 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_e3d2cc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -25,7 +25,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_e3d2cc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp isampler2DMS arg_0_1;
void textureLoad_e3d2cc() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
ivec4 res = texelFetch(arg_0_1, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl
index 37f3ac3..9842b61 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_e3d2cc(texture2d_ms<int, access::read> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm
index 31837df..8366280 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.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
@@ -40,49 +40,50 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %32 = OpConstantNull %v4int
- %33 = OpTypeFunction %v4float
+ %33 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_e3d2cc = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %res = OpVariable %_ptr_Function_v4int Function %32
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %res = OpVariable %_ptr_Function_v4int Function %33
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %int %arg_2
- %25 = OpImageFetch %v4int %27 %28 Sample %29
- OpStore %res %25
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %int %arg_2
+ %26 = OpImageFetch %v4int %28 %29 Sample %30
+ OpStore %res %26
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_e3d2cc
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_e3d2cc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_e3d2cc
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_e3d2cc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_e3d2cc
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_e3d2cc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl
index 6dd2d7d..27686e7 100644
--- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
fn textureLoad_e3d2cc() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl
index 843e20c..0a4c3ba 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: u32) -> vec4<u32>
fn textureLoad_ebfb92() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl
index 6f17474..03e13c8 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_ebfb92() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl
index 6f17474..03e13c8 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_ebfb92() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
uint4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl
index 68072ab..3530385 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_ebfb92() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_ebfb92() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp usampler2D arg_0_1;
void textureLoad_ebfb92() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl
index 4cb0be7..e527ee2 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_ebfb92(texture2d<uint, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm
index 72acde0..0329ceb 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,49 +41,51 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_ebfb92 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_ebfb92
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_ebfb92
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_ebfb92
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_ebfb92
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_ebfb92
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_ebfb92
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl
index e3bc181..ba94b17 100644
--- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<u32>;
fn textureLoad_ebfb92() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl
index 44ffa5b..32c32e7 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl
index 1ea969f..5ba462d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_f0abad() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl
index 1ea969f..5ba462d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_f0abad() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl
index 23f1106..2925070 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_f0abad() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_f0abad() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_f0abad() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl
index caf35dd..2e191f4 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_f0abad(texture2d_ms<float, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm
index 1c884d0..1ef6220 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,48 +40,50 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %32 = OpTypeFunction %v4float
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_f0abad = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4float %27 %28 Sample %29
- OpStore %res %26
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4float %29 %30 Sample %31
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %32
- %34 = OpLabel
- %35 = OpFunctionCall %void %textureLoad_f0abad
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureLoad_f0abad
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureLoad_f0abad
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureLoad_f0abad
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_f0abad
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureLoad_f0abad
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl
index a5272f8..208aa2d 100644
--- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
fn textureLoad_f0abad() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl
index b610d1f..80914aa 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res: vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl
index dd04132..9a460dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_f348d9() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl
index dd04132..9a460dd 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_f348d9() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3)));
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl
index 35f6a4e..0cc57a5 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_f348d9() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_f348d9() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_f348d9() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl
index acd3776..9ea26fd 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_f348d9(texture2d_array<float, access::sample> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
int arg_3 = 1;
float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm
index 0ad6a0b..7fa0aec 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,58 +41,59 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %29 = OpConstantNull %int
+ %30 = OpConstantNull %int
%v3uint = OpTypeVector %uint 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_f348d9 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_int Function %30
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
OpStore %arg_3 %int_1
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %int %arg_3
- %30 = OpImageFetch %v4float %31 %37 Lod %38
- OpStore %res %30
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %int %arg_3
+ %31 = OpImageFetch %v4float %32 %38 Lod %39
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_f348d9
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_f348d9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureLoad_f348d9
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureLoad_f348d9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureLoad_f348d9
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureLoad_f348d9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl
index f68ba27..4ed1b7e 100644
--- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
fn textureLoad_f348d9() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
var arg_3 = 1i;
var res : vec4<f32> = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl
index 340da55..8e623c2 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl
@@ -24,7 +24,7 @@
// fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: u32) -> vec4<i32>
fn textureLoad_f85291() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res: vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl
index 534bddc..98bcff1 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_f85291() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl
index 534bddc..98bcff1 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_f85291() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
int4 res = arg_0.Load(int3(arg_1, int(arg_2)));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl
index b0d8f40..34c2e1c 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_f85291() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -25,7 +25,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_f85291() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
@@ -42,7 +42,7 @@
uniform highp isampler2D arg_0_1;
void textureLoad_f85291() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2));
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl
index 05a688c..8bf531b 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_f85291(texture2d<int, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
int4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm
index f19cab1..29c7abd 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %33 = OpConstantNull %v4int
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4int
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_f85291 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %res = OpVariable %_ptr_Function_v4int Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %res = OpVariable %_ptr_Function_v4int Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2int %arg_1
- %30 = OpLoad %uint %arg_2
- %26 = OpImageFetch %v4int %28 %29 Lod %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2int %arg_1
+ %32 = OpLoad %uint %arg_2
+ %28 = OpImageFetch %v4int %30 %31 Lod %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_f85291
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_f85291
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_f85291
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_f85291
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_f85291
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_f85291
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl
index f06149d..b5ea7cb 100644
--- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_2d<i32>;
fn textureLoad_f85291() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
var res : vec4<i32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl
index 84ebebb..c0ae5e9 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl
index 9095d2f..307416e 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_fcd23d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl
index 9095d2f..307416e 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<float4> arg_0 : register(t0, space1);
void textureLoad_fcd23d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl
index a9d352b..7810099 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_fcd23d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
@@ -25,7 +25,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_fcd23d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
@@ -42,7 +42,7 @@
uniform highp sampler2DMS arg_0_1;
void textureLoad_fcd23d() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl
index 152e35d..e962910 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_fcd23d(depth2d_ms<float, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
float res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm
index 903c8a9..5819297 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.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
OpMemoryModel Logical GLSL450
@@ -40,49 +40,51 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %33 = OpTypeFunction %v4float
+ %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_fcd23d = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %27 = OpImageFetch %v4float %28 %29 Sample %30
- %26 = OpCompositeExtract %float %27 0
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %29 = OpImageFetch %v4float %30 %31 Sample %32
+ %28 = OpCompositeExtract %float %29 0
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureLoad_fcd23d
+%vertex_main_inner = OpFunction %v4float None %35
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureLoad_fcd23d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureLoad_fcd23d
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureLoad_fcd23d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureLoad_fcd23d
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureLoad_fcd23d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl
index b784656..15aea5d 100644
--- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
fn textureLoad_fcd23d() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : f32 = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl
index 7d350fb..3d1718e 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res: vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl
index b03e8a9..4adfd92 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_fe0565() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl
index b03e8a9..4adfd92 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DMS<uint4> arg_0 : register(t0, space1);
void textureLoad_fe0565() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
uint4 res = arg_0.Load(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl
index ec7a715..dce2e13 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_fe0565() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -25,7 +25,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_fe0565() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
@@ -42,7 +42,7 @@
uniform highp usampler2DMS arg_0_1;
void textureLoad_fe0565() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl
index f2e7ed7..34cbab3 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_fe0565(texture2d_ms<uint, access::read> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm
index a3d2fba..79c4e99 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -40,50 +40,52 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %33 = OpConstantNull %v4uint
- %34 = OpTypeFunction %v4float
+ %35 = OpConstantNull %v4uint
+ %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_fe0565 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %res = OpVariable %_ptr_Function_v4uint Function %33
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %res = OpVariable %_ptr_Function_v4uint Function %35
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- %28 = OpLoad %11 %arg_0
- %29 = OpLoad %v2uint %arg_1
- %30 = OpLoad %int %arg_2
- %26 = OpImageFetch %v4uint %28 %29 Sample %30
- OpStore %res %26
+ %30 = OpLoad %11 %arg_0
+ %31 = OpLoad %v2uint %arg_1
+ %32 = OpLoad %int %arg_2
+ %28 = OpImageFetch %v4uint %30 %31 Sample %32
+ OpStore %res %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %34
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureLoad_fe0565
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureLoad_fe0565
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %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 %13
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureLoad_fe0565
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_fe0565
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureLoad_fe0565
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureLoad_fe0565
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl
index 704e838..4b1098a 100644
--- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
fn textureLoad_fe0565() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
var res : vec4<u32> = textureLoad(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl
index 2a9ad5e..2fa7a82 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl
index 28a48c2..437984d 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_ff1119() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl
index 28a48c2..437984d 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl
@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_ff1119() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
uint arg_3 = 1u;
float res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl
index f1df6bb..04f4330 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl
@@ -2,7 +2,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_ff1119() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x;
@@ -26,7 +26,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_ff1119() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x;
@@ -44,7 +44,7 @@
uniform highp sampler2DArray arg_0_1;
void textureLoad_ff1119() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
uint arg_3 = 1u;
float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x;
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl
index c7afcd6..e2c1dec 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl
@@ -2,7 +2,7 @@
using namespace metal;
void textureLoad_ff1119(depth2d_array<float, access::sample> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
uint arg_3 = 1u;
float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm
index 15e9eee..5dfa3c0 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,59 +41,60 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %29 = OpConstantNull %uint
+ %30 = OpConstantNull %uint
%v3int = OpTypeVector %int 3
%_ptr_Function_float = OpTypePointer Function %float
- %42 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureLoad_ff1119 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_uint Function %30
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
OpStore %arg_3 %uint_1
- %32 = OpLoad %11 %arg_0
- %34 = OpLoad %v2int %arg_1
- %35 = OpCompositeExtract %int %34 0
- %36 = OpCompositeExtract %int %34 1
- %37 = OpLoad %int %arg_2
- %38 = OpCompositeConstruct %v3int %35 %36 %37
- %39 = OpLoad %uint %arg_3
- %31 = OpImageFetch %v4float %32 %38 Lod %39
- %30 = OpCompositeExtract %float %31 0
- OpStore %res %30
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %38 = OpLoad %int %arg_2
+ %39 = OpCompositeConstruct %v3int %36 %37 %38
+ %40 = OpLoad %uint %arg_3
+ %32 = OpImageFetch %v4float %33 %39 Lod %40
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureLoad_ff1119
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureLoad_ff1119
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureLoad_ff1119
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureLoad_ff1119
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureLoad_ff1119
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureLoad_ff1119
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl
index 5804382..57916d8 100644
--- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl
@@ -1,7 +1,7 @@
@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
fn textureLoad_ff1119() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
var arg_3 = 1u;
var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3);
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl
index 73882bb..e880138 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl
@@ -25,8 +25,8 @@
// fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> f32
fn textureSample_0dff6c() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.f);
+ const arg_3 = vec2<i32>(1i);
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl
index 4bd60c0..f2b5b24 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_0dff6c() {
- float2 arg_2 = (0.0f).xx;
- float res = arg_0.Sample(arg_1, arg_2, (0).xx).x;
+ float2 arg_2 = (1.0f).xx;
+ float res = arg_0.Sample(arg_1, arg_2, (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl
index 4bd60c0..f2b5b24 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_0dff6c() {
- float2 arg_2 = (0.0f).xx;
- float res = arg_0.Sample(arg_1, arg_2, (0).xx).x;
+ float2 arg_2 = (1.0f).xx;
+ float res = arg_0.Sample(arg_1, arg_2, (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl
index 29464a0..93f2ef0 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl
@@ -4,8 +4,8 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSample_0dff6c() {
- vec2 arg_2 = vec2(0.0f);
- float res = textureOffset(arg_0_arg_1, vec3(arg_2, 0.0f), ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ float res = textureOffset(arg_0_arg_1, vec3(arg_2, 0.0f), ivec2(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl
index b6fd486..1d077b7 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureSample_0dff6c(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
- float res = tint_symbol.sample(tint_symbol_1, arg_2, int2(0));
+ float2 arg_2 = float2(1.0f);
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, 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/var/textureSample/0dff6c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm
index d548219..199b9ca 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.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
@@ -27,31 +27,34 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%v4float = OpTypeVector %float 4
- %21 = OpTypeSampledImage %3
+ %23 = OpTypeSampledImage %3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %26 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpConstantNull %float
+ %32 = OpConstantNull %float
%textureSample_0dff6c = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %res = OpVariable %_ptr_Function_float Function %29
- OpStore %arg_2 %13
- %19 = OpLoad %7 %arg_1
- %20 = OpLoad %3 %arg_0
- %22 = OpSampledImage %21 %20 %19
- %23 = OpLoad %v2float %arg_2
- %17 = OpImageSampleImplicitLod %v4float %22 %23 ConstOffset %26
- %16 = OpCompositeExtract %float %17 0
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %res = OpVariable %_ptr_Function_float Function %32
+ OpStore %arg_2 %14
+ %21 = OpLoad %7 %arg_1
+ %22 = OpLoad %3 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %25 = OpLoad %v2float %arg_2
+ %19 = OpImageSampleImplicitLod %v4float %24 %25 ConstOffset %29
+ %18 = OpCompositeExtract %float %19 0
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureSample_0dff6c
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSample_0dff6c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl
index 21bf36c..d6184b7 100644
--- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl
@@ -3,8 +3,8 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_0dff6c() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.0f);
+ const arg_3 = vec2<i32>(1i);
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl
index e42371f..ce00f1f 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl
@@ -25,9 +25,9 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl
index 87521f1..c8a3fab 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_17e988() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl
index 87521f1..c8a3fab 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_17e988() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl
index 95e45f8..348c3eb 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl
@@ -4,9 +4,9 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSample_17e988() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0));
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl
index 19433eb..f330dbb 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSample_17e988(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, 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/var/textureSample/17e988.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm
index 4bb6bba..774724c 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 42
+; Bound: 44
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,41 +28,43 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %35 = OpConstantNull %v2int
+ %37 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpConstantNull %v4float
+ %40 = OpConstantNull %v4float
%textureSample_17e988 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_v4float Function %38
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %40
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %28 = OpLoad %v2float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %32 = OpLoad %int %arg_3
- %31 = OpConvertSToF %float %32
- %33 = OpCompositeConstruct %v3float %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %35
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %30 = OpLoad %v2float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %34 = OpLoad %int %arg_3
+ %33 = OpConvertSToF %float %34
+ %35 = OpCompositeConstruct %v3float %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35 ConstOffset %37
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSample_17e988
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSample_17e988
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl
index 586d22e..04cd29b 100644
--- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_17e988() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl
index 5531467..d5cac445 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl
@@ -25,9 +25,9 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
index c60f2c0..14ba49d 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_193203() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
index c60f2c0..14ba49d 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_193203() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx);
+ float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
index 4c0e571..683ab3b 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl
@@ -4,9 +4,9 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSample_193203() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0));
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
index ffe8266..9754610 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSample_193203(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, 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/var/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
index bfa4c0d..aed4148 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/193203.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
@@ -28,42 +28,45 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %36 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %39 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %39 = OpConstantNull %v4float
+ %42 = OpConstantNull %v4float
%textureSample_193203 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_v4float Function %39
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %42
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %28 = OpLoad %v2float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %32 = OpLoad %uint %arg_3
- %31 = OpConvertUToF %float %32
- %33 = OpCompositeConstruct %v3float %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %36
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %30 = OpLoad %v2float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %34 = OpLoad %uint %arg_3
+ %33 = OpConvertUToF %float %34
+ %35 = OpCompositeConstruct %v3float %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35 ConstOffset %39
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSample_193203
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSample_193203
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
index 0060bd1..1bb14d4 100644
--- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_193203() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
index b4f2ced..5939c98 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
index 8e8c108..deee4f8 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_1a4e1b() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
index 8e8c108..deee4f8 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_1a4e1b() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
index 732d16f..1c06d2c 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSample_1a4e1b() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f));
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
index f7bc435..7eed709 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
index c89531b..e71f035 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,40 +28,42 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %37 = OpConstantNull %float
+ %39 = OpConstantNull %float
%textureSample_1a4e1b = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_float Function %37
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_float Function %39
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %29 = OpLoad %v2float %arg_2
- %30 = OpCompositeExtract %float %29 0
- %31 = OpCompositeExtract %float %29 1
- %33 = OpLoad %uint %arg_3
- %32 = OpConvertUToF %float %33
- %34 = OpCompositeConstruct %v3float %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %uint %arg_3
+ %34 = OpConvertUToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureSample_1a4e1b
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSample_1a4e1b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
index 3b49da8..58721bd 100644
--- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_1a4e1b() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl
index b575fba..2f44331 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl
@@ -25,8 +25,8 @@
// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, @const offset: vec3<i32>) -> vec4<f32>
fn textureSample_2149ec() {
- var arg_2 = vec3<f32>();
- const arg_3 = vec3<i32>();
+ var arg_2 = vec3<f32>(1.f);
+ const arg_3 = vec3<i32>(1i);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl
index 1528b90..851fcb9 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_2149ec() {
- float3 arg_2 = (0.0f).xxx;
- float4 res = arg_0.Sample(arg_1, arg_2, (0).xxx);
+ float3 arg_2 = (1.0f).xxx;
+ float4 res = arg_0.Sample(arg_1, arg_2, (1).xxx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl
index 1528b90..851fcb9 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_2149ec() {
- float3 arg_2 = (0.0f).xxx;
- float4 res = arg_0.Sample(arg_1, arg_2, (0).xxx);
+ float3 arg_2 = (1.0f).xxx;
+ float4 res = arg_0.Sample(arg_1, arg_2, (1).xxx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl
index 67fde95..1f2238c 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl
@@ -4,8 +4,8 @@
uniform highp sampler3D arg_0_arg_1;
void textureSample_2149ec() {
- vec3 arg_2 = vec3(0.0f);
- vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(0));
+ vec3 arg_2 = vec3(1.0f);
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl
index 96ab51e..d41fa5a 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureSample_2149ec(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float3 arg_2 = float3(0.0f);
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int3(0));
+ float3 arg_2 = float3(1.0f);
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, 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/var/textureSample/2149ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm
index 8e435b9..2882225 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.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,30 +27,33 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%v4float = OpTypeVector %float 4
- %20 = OpTypeSampledImage %3
+ %22 = OpTypeSampledImage %3
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %25 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %28 = OpConstantNull %v4float
+ %31 = OpConstantNull %v4float
%textureSample_2149ec = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %res = OpVariable %_ptr_Function_v4float Function %28
- OpStore %arg_2 %13
- %18 = OpLoad %7 %arg_1
- %19 = OpLoad %3 %arg_0
- %21 = OpSampledImage %20 %19 %18
- %22 = OpLoad %v3float %arg_2
- %16 = OpImageSampleImplicitLod %v4float %21 %22 ConstOffset %25
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %res = OpVariable %_ptr_Function_v4float Function %31
+ OpStore %arg_2 %14
+ %20 = OpLoad %7 %arg_1
+ %21 = OpLoad %3 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %24 = OpLoad %v3float %arg_2
+ %18 = OpImageSampleImplicitLod %v4float %23 %24 ConstOffset %28
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %30 = OpLabel
- %31 = OpFunctionCall %void %textureSample_2149ec
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureSample_2149ec
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl
index 2d7485d..4504ed8 100644
--- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl
@@ -3,8 +3,8 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_2149ec() {
- var arg_2 = vec3<f32>();
- const arg_3 = vec3<i32>();
+ var arg_2 = vec3<f32>(1.0f);
+ const arg_3 = vec3<i32>(1i);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl
index 201d5e4..2a51765 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl
@@ -25,7 +25,7 @@
// fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>) -> f32
fn textureSample_38bbb9() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: f32 = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl
index ffedf8f..02dfbcd 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_38bbb9() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float res = arg_0.Sample(arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl
index ffedf8f..02dfbcd 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_38bbb9() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float res = arg_0.Sample(arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl
index 31f10fa..4fe5c89 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSample_38bbb9() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float res = texture(arg_0_arg_1, vec3(arg_2, 0.0f));
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl
index 6482503..332cc17 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float res = tint_symbol.sample(tint_symbol_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm
index 05511e9..67ed449 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.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
@@ -27,28 +27,30 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%v4float = OpTypeVector %float 4
- %21 = OpTypeSampledImage %3
+ %23 = OpTypeSampledImage %3
%_ptr_Function_float = OpTypePointer Function %float
- %26 = OpConstantNull %float
+ %28 = OpConstantNull %float
%textureSample_38bbb9 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %res = OpVariable %_ptr_Function_float Function %26
- OpStore %arg_2 %13
- %19 = OpLoad %7 %arg_1
- %20 = OpLoad %3 %arg_0
- %22 = OpSampledImage %21 %20 %19
- %23 = OpLoad %v2float %arg_2
- %17 = OpImageSampleImplicitLod %v4float %22 %23
- %16 = OpCompositeExtract %float %17 0
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %res = OpVariable %_ptr_Function_float Function %28
+ OpStore %arg_2 %14
+ %21 = OpLoad %7 %arg_1
+ %22 = OpLoad %3 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %25 = OpLoad %v2float %arg_2
+ %19 = OpImageSampleImplicitLod %v4float %24 %25
+ %18 = OpCompositeExtract %float %19 0
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %28 = OpLabel
- %29 = OpFunctionCall %void %textureSample_38bbb9
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureSample_38bbb9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl
index 2d6c9d1..9bad3e4 100644
--- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_38bbb9() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : f32 = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl
index c833f38..07d3d57 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl
@@ -25,7 +25,7 @@
// fn textureSample(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureSample_3b50bd() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl
index 29a54ea..5eb33e5 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_3b50bd() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl
index 29a54ea..5eb33e5 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_3b50bd() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl
index 1f936b4..5dedecf 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler3D arg_0_arg_1;
void textureSample_3b50bd() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
vec4 res = texture(arg_0_arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl
index 0bf2684..85f1579 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float4 res = tint_symbol.sample(tint_symbol_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm
index 2539dd1..205ec4b 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.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
@@ -27,27 +27,29 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%v4float = OpTypeVector %float 4
- %20 = OpTypeSampledImage %3
+ %22 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %25 = OpConstantNull %v4float
+ %27 = OpConstantNull %v4float
%textureSample_3b50bd = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %res = OpVariable %_ptr_Function_v4float Function %25
- OpStore %arg_2 %13
- %18 = OpLoad %7 %arg_1
- %19 = OpLoad %3 %arg_0
- %21 = OpSampledImage %20 %19 %18
- %22 = OpLoad %v3float %arg_2
- %16 = OpImageSampleImplicitLod %v4float %21 %22
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %res = OpVariable %_ptr_Function_v4float Function %27
+ OpStore %arg_2 %14
+ %20 = OpLoad %7 %arg_1
+ %21 = OpLoad %3 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %24 = OpLoad %v3float %arg_2
+ %18 = OpImageSampleImplicitLod %v4float %23 %24
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %27 = OpLabel
- %28 = OpFunctionCall %void %textureSample_3b50bd
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureSample_3b50bd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl
index 77b2588..e58076b 100644
--- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_3b50bd() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
index 96ff918..bd4f57c 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl
@@ -25,9 +25,9 @@
// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: u32, @const offset: vec2<i32>) -> f32
fn textureSample_4703d0() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
index 3761e5a..0a168db 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_4703d0() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
index 3761e5a..0a168db 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_4703d0() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
index 77d8949..313f70a 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSample_4703d0(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, 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/var/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
index ed2182b..f42d049 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.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
@@ -28,43 +28,46 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %37 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %40 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %40 = OpConstantNull %float
+ %43 = OpConstantNull %float
%textureSample_4703d0 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_float Function %40
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_float Function %43
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %29 = OpLoad %v2float %arg_2
- %30 = OpCompositeExtract %float %29 0
- %31 = OpCompositeExtract %float %29 1
- %33 = OpLoad %uint %arg_3
- %32 = OpConvertUToF %float %33
- %34 = OpCompositeConstruct %v3float %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %37
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %uint %arg_3
+ %34 = OpConvertUToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36 ConstOffset %40
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureSample_4703d0
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSample_4703d0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
index 00781e5..946bf08 100644
--- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_4703d0() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl
index 6f30c35..fbdf221 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl
index c779be1..5e80f0b 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_4dd1bf() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl
index c779be1..5e80f0b 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_4dd1bf() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl
index 89cfd57..a643911 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm
index 131c440..16d357e 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 40
+; Bound: 42
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -29,39 +29,41 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %36 = OpConstantNull %v4float
+ %38 = OpConstantNull %v4float
%textureSample_4dd1bf = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_v4float Function %36
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %38
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %27 = OpLoad %v3float %arg_2
- %28 = OpCompositeExtract %float %27 0
- %29 = OpCompositeExtract %float %27 1
- %30 = OpCompositeExtract %float %27 2
- %32 = OpLoad %int %arg_3
- %31 = OpConvertSToF %float %32
- %33 = OpCompositeConstruct %v4float %28 %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %29 = OpLoad %v3float %arg_2
+ %30 = OpCompositeExtract %float %29 0
+ %31 = OpCompositeExtract %float %29 1
+ %32 = OpCompositeExtract %float %29 2
+ %34 = OpLoad %int %arg_3
+ %33 = OpConvertSToF %float %34
+ %35 = OpCompositeConstruct %v4float %30 %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureSample_4dd1bf
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSample_4dd1bf
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl
index f20de37..c81daf1 100644
--- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_4dd1bf() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl
index 9d0ec56..1e81aff 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl
@@ -25,7 +25,7 @@
// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSample_51b514() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl
index 32dce22..05b317f 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_51b514() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl
index 32dce22..05b317f 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_51b514() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl
index ab891bc..8728e28 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2D arg_0_arg_1;
void textureSample_51b514() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = texture(arg_0_arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl
index bffded9..c988d80 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float4 res = tint_symbol.sample(tint_symbol_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm
index fe14ef4..63296a4 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/51b514.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
@@ -27,27 +27,29 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%v4float = OpTypeVector %float 4
- %20 = OpTypeSampledImage %3
+ %22 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %25 = OpConstantNull %v4float
+ %27 = OpConstantNull %v4float
%textureSample_51b514 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %res = OpVariable %_ptr_Function_v4float Function %25
- OpStore %arg_2 %13
- %18 = OpLoad %7 %arg_1
- %19 = OpLoad %3 %arg_0
- %21 = OpSampledImage %20 %19 %18
- %22 = OpLoad %v2float %arg_2
- %16 = OpImageSampleImplicitLod %v4float %21 %22
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %res = OpVariable %_ptr_Function_v4float Function %27
+ OpStore %arg_2 %14
+ %20 = OpLoad %7 %arg_1
+ %21 = OpLoad %3 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %24 = OpLoad %v2float %arg_2
+ %18 = OpImageSampleImplicitLod %v4float %23 %24
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %27 = OpLabel
- %28 = OpFunctionCall %void %textureSample_51b514
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureSample_51b514
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl
index 23f0f36..14161ec 100644
--- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_51b514() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl
index 1f61dc8..82d3e6f 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl
@@ -25,9 +25,9 @@
// fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2<f32>, array_index: i32, @const offset: vec2<i32>) -> f32
fn textureSample_60bf45() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl
index 6a9339e..4d12d1b4a 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_60bf45() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl
index 6a9339e..4d12d1b4a 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_60bf45() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x;
+ float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x;
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl
index b822a47..e2a533c 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSample_60bf45(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0));
+ float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, 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/var/textureSample/60bf45.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm
index efd63d2..30716a2 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 45
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,42 +28,44 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %36 = OpConstantNull %v2int
+ %38 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %39 = OpConstantNull %float
+ %41 = OpConstantNull %float
%textureSample_60bf45 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_float Function %39
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_float Function %41
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %29 = OpLoad %v2float %arg_2
- %30 = OpCompositeExtract %float %29 0
- %31 = OpCompositeExtract %float %29 1
- %33 = OpLoad %int %arg_3
- %32 = OpConvertSToF %float %33
- %34 = OpCompositeConstruct %v3float %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %36
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %int %arg_3
+ %34 = OpConvertSToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36 ConstOffset %38
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSample_60bf45
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSample_60bf45
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl
index dfcc39c..20e38db 100644
--- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_60bf45() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl
index 202aa33..d2bbdce 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl
index 01c97bc..17ca05c 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_6717ca() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl
index 01c97bc..17ca05c 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_6717ca() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl
index d8cdc14..785b0c8 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSample_6717ca() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl
index e512eca..970129e 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm
index 8fd8ccf..66cc8f4 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 40
+; Bound: 42
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,39 +28,41 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %36 = OpConstantNull %v4float
+ %38 = OpConstantNull %v4float
%textureSample_6717ca = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_v4float Function %36
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %38
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %28 = OpLoad %v2float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %32 = OpLoad %int %arg_3
- %31 = OpConvertSToF %float %32
- %33 = OpCompositeConstruct %v3float %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %30 = OpLoad %v2float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %34 = OpLoad %int %arg_3
+ %33 = OpConvertSToF %float %34
+ %35 = OpCompositeConstruct %v3float %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureSample_6717ca
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSample_6717ca
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl
index 037b29b..44579f3 100644
--- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_6717ca() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl
index 1b24313..066a4c0 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl
index 88b7a82..5b1a5d9 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_7e9ffd() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl
index 88b7a82..5b1a5d9 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_7e9ffd() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl
index 1f79b36..fd4c016 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSample_7e9ffd() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f));
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl
index 9a29676..24cda54 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm
index 76ef866..ecc54a0 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,40 +28,42 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %37 = OpConstantNull %float
+ %39 = OpConstantNull %float
%textureSample_7e9ffd = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_float Function %37
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_float Function %39
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %29 = OpLoad %v2float %arg_2
- %30 = OpCompositeExtract %float %29 0
- %31 = OpCompositeExtract %float %29 1
- %33 = OpLoad %int %arg_3
- %32 = OpConvertSToF %float %33
- %34 = OpCompositeConstruct %v3float %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %31 = OpLoad %v2float %arg_2
+ %32 = OpCompositeExtract %float %31 0
+ %33 = OpCompositeExtract %float %31 1
+ %35 = OpLoad %int %arg_3
+ %34 = OpConvertSToF %float %35
+ %36 = OpCompositeConstruct %v3float %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureSample_7e9ffd
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSample_7e9ffd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl
index 541e9b9..1b7dc85 100644
--- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_7e9ffd() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
index a31832c..1ca0664 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
index ddbeb1a..8543883 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_7fd8cb() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
index ddbeb1a..8543883 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_7fd8cb() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
index 80016e7..ef80931 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
index 962925e..8bba39b 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 43
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -29,40 +29,42 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%_ptr_Function_float = OpTypePointer Function %float
- %37 = OpConstantNull %float
+ %39 = OpConstantNull %float
%textureSample_7fd8cb = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_float Function %37
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_float Function %39
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v3float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %31 = OpCompositeExtract %float %28 2
- %33 = OpLoad %uint %arg_3
- %32 = OpConvertUToF %float %33
- %34 = OpCompositeConstruct %v4float %29 %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %33 = OpCompositeExtract %float %30 2
+ %35 = OpLoad %uint %arg_3
+ %34 = OpConvertUToF %float %35
+ %36 = OpCompositeConstruct %v4float %31 %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureSample_7fd8cb
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSample_7fd8cb
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
index 6ed7b4c..6b4cfa7 100644
--- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_7fd8cb() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl
index a60754c..2c3b8c8 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl
@@ -25,8 +25,8 @@
// fn textureSample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureSample_85c4ba() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.f);
+ const arg_3 = vec2<i32>(1i);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl
index d96272b..582b2c5 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_85c4ba() {
- float2 arg_2 = (0.0f).xx;
- float4 res = arg_0.Sample(arg_1, arg_2, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float4 res = arg_0.Sample(arg_1, arg_2, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl
index d96272b..582b2c5 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl
@@ -2,8 +2,8 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_85c4ba() {
- float2 arg_2 = (0.0f).xx;
- float4 res = arg_0.Sample(arg_1, arg_2, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float4 res = arg_0.Sample(arg_1, arg_2, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl
index 7ec1594..fee2b62 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl
@@ -4,8 +4,8 @@
uniform highp sampler2D arg_0_arg_1;
void textureSample_85c4ba() {
- vec2 arg_2 = vec2(0.0f);
- vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl
index 16f9ef6..1bf5459 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureSample_85c4ba(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int2(0));
+ float2 arg_2 = float2(1.0f);
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, 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/var/textureSample/85c4ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm
index 96546eb..320dfc4 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.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,30 +27,33 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%v4float = OpTypeVector %float 4
- %20 = OpTypeSampledImage %3
+ %22 = OpTypeSampledImage %3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %25 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %28 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %28 = OpConstantNull %v4float
+ %31 = OpConstantNull %v4float
%textureSample_85c4ba = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %res = OpVariable %_ptr_Function_v4float Function %28
- OpStore %arg_2 %13
- %18 = OpLoad %7 %arg_1
- %19 = OpLoad %3 %arg_0
- %21 = OpSampledImage %20 %19 %18
- %22 = OpLoad %v2float %arg_2
- %16 = OpImageSampleImplicitLod %v4float %21 %22 ConstOffset %25
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %res = OpVariable %_ptr_Function_v4float Function %31
+ OpStore %arg_2 %14
+ %20 = OpLoad %7 %arg_1
+ %21 = OpLoad %3 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %24 = OpLoad %v2float %arg_2
+ %18 = OpImageSampleImplicitLod %v4float %23 %24 ConstOffset %28
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %30 = OpLabel
- %31 = OpFunctionCall %void %textureSample_85c4ba
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureSample_85c4ba
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl
index 8f1a0af..209f269 100644
--- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl
@@ -3,8 +3,8 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_85c4ba() {
- var arg_2 = vec2<f32>();
- const arg_3 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.0f);
+ const arg_3 = vec2<i32>(1i);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
index 6f0116e..f47d67e 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
index 5ef25be..de700b8 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_bc7477() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
index 5ef25be..de700b8 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_bc7477() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
index 8b3614e..c45ece0 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
index 4a09842..6732a66 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 40
+; Bound: 42
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -29,39 +29,41 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %36 = OpConstantNull %v4float
+ %38 = OpConstantNull %v4float
%textureSample_bc7477 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_v4float Function %36
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %38
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %27 = OpLoad %v3float %arg_2
- %28 = OpCompositeExtract %float %27 0
- %29 = OpCompositeExtract %float %27 1
- %30 = OpCompositeExtract %float %27 2
- %32 = OpLoad %uint %arg_3
- %31 = OpConvertUToF %float %32
- %33 = OpCompositeConstruct %v4float %28 %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %29 = OpLoad %v3float %arg_2
+ %30 = OpCompositeExtract %float %29 0
+ %31 = OpCompositeExtract %float %29 1
+ %32 = OpCompositeExtract %float %29 2
+ %34 = OpLoad %uint %arg_3
+ %33 = OpConvertUToF %float %34
+ %35 = OpCompositeConstruct %v4float %30 %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureSample_bc7477
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSample_bc7477
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
index 48a05ae..159fd69 100644
--- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_bc7477() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl
index 0318251..3937cec 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl
index 209b7d3..be2d46c 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_c2f4e8() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl
index 209b7d3..be2d46c 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_c2f4e8() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl
index 0a8ee57..5a7efc4 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm
index 357c5ff..2e9a4e2 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 43
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -29,40 +29,42 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
+ %22 = OpConstantNull %int
%v4float = OpTypeVector %float 4
- %26 = OpTypeSampledImage %3
+ %28 = OpTypeSampledImage %3
%_ptr_Function_float = OpTypePointer Function %float
- %37 = OpConstantNull %float
+ %39 = OpConstantNull %float
%textureSample_c2f4e8 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %res = OpVariable %_ptr_Function_float Function %37
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %res = OpVariable %_ptr_Function_float Function %39
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
- %24 = OpLoad %7 %arg_1
- %25 = OpLoad %3 %arg_0
- %27 = OpSampledImage %26 %25 %24
- %28 = OpLoad %v3float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %31 = OpCompositeExtract %float %28 2
- %33 = OpLoad %int %arg_3
- %32 = OpConvertSToF %float %33
- %34 = OpCompositeConstruct %v4float %29 %30 %31 %32
- %22 = OpImageSampleImplicitLod %v4float %27 %34
- %21 = OpCompositeExtract %float %22 0
- OpStore %res %21
+ %26 = OpLoad %7 %arg_1
+ %27 = OpLoad %3 %arg_0
+ %29 = OpSampledImage %28 %27 %26
+ %30 = OpLoad %v3float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %33 = OpCompositeExtract %float %30 2
+ %35 = OpLoad %int %arg_3
+ %34 = OpConvertSToF %float %35
+ %36 = OpCompositeConstruct %v4float %31 %32 %33 %34
+ %24 = OpImageSampleImplicitLod %v4float %29 %36
+ %23 = OpCompositeExtract %float %24 0
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureSample_c2f4e8
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSample_c2f4e8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl
index f6b7192..b5c02ef 100644
--- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_c2f4e8() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
index 653e5a4..0a4bb40 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
index 40fc858..00a1d0a 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_d6b281() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
index 40fc858..00a1d0a 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_d6b281() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
index bab02f6..309e180 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSample_d6b281() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)));
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
index cac3226..2d0626f 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
index df39671..c74ef88 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 40
+; Bound: 42
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,39 +28,41 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
+ %22 = OpConstantNull %uint
%v4float = OpTypeVector %float 4
- %25 = OpTypeSampledImage %3
+ %27 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %36 = OpConstantNull %v4float
+ %38 = OpConstantNull %v4float
%textureSample_d6b281 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %res = OpVariable %_ptr_Function_v4float Function %36
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %res = OpVariable %_ptr_Function_v4float Function %38
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
- %23 = OpLoad %7 %arg_1
- %24 = OpLoad %3 %arg_0
- %26 = OpSampledImage %25 %24 %23
- %28 = OpLoad %v2float %arg_2
- %29 = OpCompositeExtract %float %28 0
- %30 = OpCompositeExtract %float %28 1
- %32 = OpLoad %uint %arg_3
- %31 = OpConvertUToF %float %32
- %33 = OpCompositeConstruct %v3float %29 %30 %31
- %21 = OpImageSampleImplicitLod %v4float %26 %33
- OpStore %res %21
+ %25 = OpLoad %7 %arg_1
+ %26 = OpLoad %3 %arg_0
+ %28 = OpSampledImage %27 %26 %25
+ %30 = OpLoad %v2float %arg_2
+ %31 = OpCompositeExtract %float %30 0
+ %32 = OpCompositeExtract %float %30 1
+ %34 = OpLoad %uint %arg_3
+ %33 = OpConvertUToF %float %34
+ %35 = OpCompositeConstruct %v3float %31 %32 %33
+ %23 = OpImageSampleImplicitLod %v4float %28 %35
+ OpStore %res %23
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureSample_d6b281
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureSample_d6b281
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
index 56e467d..30e87bd 100644
--- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_d6b281() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl
index bff2b62..be4d74e 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl
@@ -25,7 +25,7 @@
// fn textureSample(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureSample_e53267() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var res: vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl
index 171df8a..ab598e1 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_e53267() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl
index 171df8a..ab598e1 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_e53267() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float4 res = arg_0.Sample(arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl
index 7bfc11a..3801b6b 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp samplerCube arg_0_arg_1;
void textureSample_e53267() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
vec4 res = texture(arg_0_arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl
index f6987da..f5cc1bf 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float4 res = tint_symbol.sample(tint_symbol_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm
index 7a35d91..e75f05a 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/e53267.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
@@ -27,27 +27,29 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%v4float = OpTypeVector %float 4
- %20 = OpTypeSampledImage %3
+ %22 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %25 = OpConstantNull %v4float
+ %27 = OpConstantNull %v4float
%textureSample_e53267 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %res = OpVariable %_ptr_Function_v4float Function %25
- OpStore %arg_2 %13
- %18 = OpLoad %7 %arg_1
- %19 = OpLoad %3 %arg_0
- %21 = OpSampledImage %20 %19 %18
- %22 = OpLoad %v3float %arg_2
- %16 = OpImageSampleImplicitLod %v4float %21 %22
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %res = OpVariable %_ptr_Function_v4float Function %27
+ OpStore %arg_2 %14
+ %20 = OpLoad %7 %arg_1
+ %21 = OpLoad %3 %arg_0
+ %23 = OpSampledImage %22 %21 %20
+ %24 = OpLoad %v3float %arg_2
+ %18 = OpImageSampleImplicitLod %v4float %23 %24
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %27 = OpLabel
- %28 = OpFunctionCall %void %textureSample_e53267
+ %29 = OpLabel
+ %30 = OpFunctionCall %void %textureSample_e53267
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl
index 457d7c7..7d409db 100644
--- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_e53267() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl
index 5d28850..21f858d 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl
@@ -25,7 +25,7 @@
// fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32
fn textureSample_ea7030() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var res: f32 = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl
index 35bbed72..454ec68 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_ea7030() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float res = arg_0.Sample(arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl
index 35bbed72..454ec68 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSample_ea7030() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float res = arg_0.Sample(arg_1, arg_2).x;
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl
index 5658098..18eee21 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureSample_ea7030() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float res = texture(arg_0_arg_1, vec4(arg_2, 0.0f));
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl
index daefdff..5b614e4 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float res = tint_symbol.sample(tint_symbol_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm
index b7bf9af..1fc321e 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.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
@@ -27,28 +27,30 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%v4float = OpTypeVector %float 4
- %21 = OpTypeSampledImage %3
+ %23 = OpTypeSampledImage %3
%_ptr_Function_float = OpTypePointer Function %float
- %26 = OpConstantNull %float
+ %28 = OpConstantNull %float
%textureSample_ea7030 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %res = OpVariable %_ptr_Function_float Function %26
- OpStore %arg_2 %13
- %19 = OpLoad %7 %arg_1
- %20 = OpLoad %3 %arg_0
- %22 = OpSampledImage %21 %20 %19
- %23 = OpLoad %v3float %arg_2
- %17 = OpImageSampleImplicitLod %v4float %22 %23
- %16 = OpCompositeExtract %float %17 0
- OpStore %res %16
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %res = OpVariable %_ptr_Function_float Function %28
+ OpStore %arg_2 %14
+ %21 = OpLoad %7 %arg_1
+ %22 = OpLoad %3 %arg_0
+ %24 = OpSampledImage %23 %22 %21
+ %25 = OpLoad %v3float %arg_2
+ %19 = OpImageSampleImplicitLod %v4float %24 %25
+ %18 = OpCompositeExtract %float %19 0
+ OpStore %res %18
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %28 = OpLabel
- %29 = OpFunctionCall %void %textureSample_ea7030
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureSample_ea7030
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl
index db6574c..312fb8a 100644
--- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSample_ea7030() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var res : f32 = textureSample(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl
index dbe6d14..f908bae 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl
@@ -25,7 +25,7 @@
// fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleBaseClampToEdge_7c04e6() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
index 629c97a..c64a759 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl
@@ -91,7 +91,7 @@
}
void textureSampleBaseClampToEdge_7c04e6() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
index 629c97a..c64a759 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl
@@ -91,7 +91,7 @@
}
void textureSampleBaseClampToEdge_7c04e6() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
index c791249..a7c54d9 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/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() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
@@ -136,7 +136,7 @@
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
void textureSampleBaseClampToEdge_7c04e6() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
@@ -208,7 +208,7 @@
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
void textureSampleBaseClampToEdge_7c04e6() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl
index a712ee8..33c183c 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, arg_2, *(tint_symbol_4));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
index 76ec885..ac6a1b9 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 166
+; Bound: 167
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
@@ -128,10 +128,11 @@
%119 = OpConstantNull %uint
%void = OpTypeVoid
%137 = OpTypeFunction %void
+ %141 = OpConstantComposite %v2float %float_1 %float_1
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %153 = OpTypeFunction %v4float
+ %154 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %25
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@@ -245,36 +246,36 @@
%140 = OpLabel
%arg_2 = OpVariable %_ptr_Function_v2float Function %87
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %87
- %143 = OpLoad %11 %arg_0
- %144 = OpLoad %11 %ext_tex_plane_1
- %145 = OpLoad %24 %arg_1
- %146 = OpLoad %v2float %arg_2
- %149 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
- %150 = OpLoad %ExternalTextureParams %149
- %142 = OpFunctionCall %v4float %textureSampleExternal %143 %144 %145 %146 %150
- OpStore %res %142
+ OpStore %arg_2 %141
+ %144 = OpLoad %11 %arg_0
+ %145 = OpLoad %11 %ext_tex_plane_1
+ %146 = OpLoad %24 %arg_1
+ %147 = OpLoad %v2float %arg_2
+ %150 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %151 = OpLoad %ExternalTextureParams %150
+ %143 = OpFunctionCall %v4float %textureSampleExternal %144 %145 %146 %147 %151
+ OpStore %res %143
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %153
- %155 = OpLabel
- %156 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
+%vertex_main_inner = OpFunction %v4float None %154
+ %156 = OpLabel
+ %157 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %137
- %158 = OpLabel
- %159 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %159
+ %159 = OpLabel
+ %160 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %160
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %137
- %161 = OpLabel
- %162 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
+ %162 = OpLabel
+ %163 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %137
- %164 = OpLabel
- %165 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
+ %165 = OpLabel
+ %166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl
index ec8947e..55d13b7 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBaseClampToEdge_7c04e6() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl
index 54192fc..e45b575 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl
@@ -25,7 +25,7 @@
// fn textureSampleBaseClampToEdge(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleBaseClampToEdge_9ca02c() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl
index 1e3e8bd..8382f63 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl
@@ -11,7 +11,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBaseClampToEdge_9ca02c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl
index 1e3e8bd..8382f63 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl
@@ -11,7 +11,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBaseClampToEdge_9ca02c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
index 0a11b0e..f746b03 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/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() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2);
}
@@ -42,7 +42,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D arg_0_arg_1;
void textureSampleBaseClampToEdge_9ca02c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2);
}
@@ -67,7 +67,7 @@
uniform highp sampler2D arg_0_1;
uniform highp sampler2D arg_0_arg_1;
void textureSampleBaseClampToEdge_9ca02c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl
index 04222ae..f582c805 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl
@@ -9,7 +9,7 @@
}
void textureSampleBaseClampToEdge_9ca02c(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm
index 31905a1..b9de795 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 66
+; Bound: 67
; Schema: 0
OpCapability Shader
OpCapability ImageQuery
@@ -61,8 +61,9 @@
%40 = OpTypeSampledImage %11
%void = OpTypeVoid
%42 = OpTypeFunction %void
+ %46 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %53 = OpTypeFunction %v4float
+ %54 = OpTypeFunction %v4float
%tint_textureSampleBaseClampToEdge = OpFunction %v4float None %15
%t = OpFunctionParameter %11
%s = OpFunctionParameter %14
@@ -83,33 +84,33 @@
%45 = OpLabel
%arg_2 = OpVariable %_ptr_Function_v2float Function %37
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %37
- %48 = OpLoad %11 %arg_0
- %49 = OpLoad %14 %arg_1
- %50 = OpLoad %v2float %arg_2
- %47 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %48 %49 %50
- OpStore %res %47
+ OpStore %arg_2 %46
+ %49 = OpLoad %11 %arg_0
+ %50 = OpLoad %14 %arg_1
+ %51 = OpLoad %v2float %arg_2
+ %48 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %49 %50 %51
+ OpStore %res %48
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %53
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
+%vertex_main_inner = OpFunction %v4float None %54
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %42
- %58 = OpLabel
- %59 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %59
+ %59 = OpLabel
+ %60 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %60
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %42
- %61 = OpLabel
- %62 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %42
- %64 = OpLabel
- %65 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
+ %65 = OpLabel
+ %66 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl
index a70dd35..50130e1 100644
--- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBaseClampToEdge_9ca02c() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
index 328137e..c783034 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
index 0812196..5c5477d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_1c707e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
index 0812196..5c5477d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_1c707e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
index 2185407..ac47fee 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleBias_1c707e() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
index a7de0c8..137fdb0 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
index 22a6cde..12fa1f8 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.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
@@ -29,45 +29,46 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpConstantNull %v4float
+ %42 = OpConstantNull %v4float
%textureSampleBias_1c707e = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %41
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %42
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %32 = OpLoad %v2float %arg_2
- %33 = OpCompositeExtract %float %32 0
- %34 = OpCompositeExtract %float %32 1
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertUToF %float %36
- %37 = OpCompositeConstruct %v3float %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %33 = OpLoad %v2float %arg_2
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %37 = OpLoad %uint %arg_3
+ %36 = OpConvertUToF %float %37
+ %38 = OpCompositeConstruct %v3float %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleBias_1c707e
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleBias_1c707e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
index 674136f..5baf826 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_1c707e() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl
index 56dd499..fca7000 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl
index 6fd7133..53cba96 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_53b9f7() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl
index 6fd7133..53cba96 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_53b9f7() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
index 2629869..b6be7d7 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleBias_53b9f7() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = texture(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl
index c9ed71a..e9e8884 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm
index 58add66..1881889 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 34
+; Bound: 35
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,33 +28,34 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
+ %20 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %24 = OpTypeSampledImage %3
+ %25 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %30 = OpConstantNull %v4float
+ %31 = OpConstantNull %v4float
%textureSampleBias_53b9f7 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_v4float Function %30
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %31
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %22 = OpLoad %7 %arg_1
- %23 = OpLoad %3 %arg_0
- %25 = OpSampledImage %24 %23 %22
- %26 = OpLoad %v3float %arg_2
- %27 = OpLoad %float %arg_3
- %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27
- OpStore %res %20
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v3float %arg_2
+ %28 = OpLoad %float %arg_3
+ %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureSampleBias_53b9f7
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureSampleBias_53b9f7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl
index b3ca71d..013d566 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_53b9f7() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl
index db6c22f..b21f984 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleBias(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, bias: f32, @const offset: vec3<i32>) -> vec4<f32>
fn textureSampleBias_594824() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec3<i32>();
+ const arg_4 = vec3<i32>(1i);
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl
index fa703bc..d031784 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_594824() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xxx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xxx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl
index fa703bc..d031784 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_594824() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xxx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xxx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
index 86b3985..e8156db 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl
@@ -4,9 +4,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleBias_594824() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(0), arg_3);
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(1), arg_3);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl
index b1579e0..46b053a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleBias_594824(texture3d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int3(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), 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/var/textureSampleBias/594824.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm
index 2360528..2a8998d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 37
+; Bound: 39
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,36 +28,38 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
+ %20 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %24 = OpTypeSampledImage %3
+ %25 = OpTypeSampledImage %3
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %30 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %32 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %33 = OpConstantNull %v4float
+ %35 = OpConstantNull %v4float
%textureSampleBias_594824 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_v4float Function %33
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %35
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %22 = OpLoad %7 %arg_1
- %23 = OpLoad %3 %arg_0
- %25 = OpSampledImage %24 %23 %22
- %26 = OpLoad %v3float %arg_2
- %27 = OpLoad %float %arg_3
- %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias|ConstOffset %27 %30
- OpStore %res %20
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v3float %arg_2
+ %28 = OpLoad %float %arg_3
+ %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias|ConstOffset %28 %32
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureSampleBias_594824
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureSampleBias_594824
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl
index c271970..ff3c1c0 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_594824() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec3<i32>();
+ const arg_4 = vec3<i32>(1i);
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl
index b142eff..01d7ab4 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl
index 95c453b..daef964 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_6a9113() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl
index 95c453b..daef964 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_6a9113() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
index 4ff6ea8..738eb81 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleBias_6a9113() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = texture(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl
index a60a0d6..31f81b9 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm
index 75ae173..3ebab6b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 34
+; Bound: 35
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,33 +28,34 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
+ %20 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %24 = OpTypeSampledImage %3
+ %25 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %30 = OpConstantNull %v4float
+ %31 = OpConstantNull %v4float
%textureSampleBias_6a9113 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_v4float Function %30
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %31
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %22 = OpLoad %7 %arg_1
- %23 = OpLoad %3 %arg_0
- %25 = OpSampledImage %24 %23 %22
- %26 = OpLoad %v2float %arg_2
- %27 = OpLoad %float %arg_3
- %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27
- OpStore %res %20
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v2float %arg_2
+ %28 = OpLoad %float %arg_3
+ %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureSampleBias_6a9113
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureSampleBias_6a9113
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl
index 119bbca..532fbbe 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_6a9113() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl
index cfded58..e0c8861 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl
index 27ee32d..0e3bcba 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_80e579() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl
index 27ee32d..0e3bcba 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_80e579() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
index 4b8b55e..cdf9c71 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleBias_80e579() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl
index 310f549..982a2b6 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm
index 2afe0df..76efd81 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.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
@@ -29,45 +29,46 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpConstantNull %v4float
+ %42 = OpConstantNull %v4float
%textureSampleBias_80e579 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %41
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %42
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %32 = OpLoad %v2float %arg_2
- %33 = OpCompositeExtract %float %32 0
- %34 = OpCompositeExtract %float %32 1
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %37 = OpCompositeConstruct %v3float %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %33 = OpLoad %v2float %arg_2
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %37 = OpLoad %int %arg_3
+ %36 = OpConvertSToF %float %37
+ %38 = OpCompositeConstruct %v3float %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleBias_80e579
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleBias_80e579
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl
index 4b76b6f..4a78359 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_80e579() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
index 2ffa8d4..75c7373 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
index b1edf8b..8d7ff39 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_87915c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
index b1edf8b..8d7ff39 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_87915c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
index b2b2648..06cb44a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl
@@ -4,10 +4,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleBias_87915c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1), arg_4);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
index 37303ae..1232dd5 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleBias_87915c(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), 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/var/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
index d8da7ba..d9a8476 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 48
+; Bound: 50
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -29,48 +29,50 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %41 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %43 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %44 = OpConstantNull %v4float
+ %46 = OpConstantNull %v4float
%textureSampleBias_87915c = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %44
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %46
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %32 = OpLoad %v2float %arg_2
- %33 = OpCompositeExtract %float %32 0
- %34 = OpCompositeExtract %float %32 1
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertUToF %float %36
- %37 = OpCompositeConstruct %v3float %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %41
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %33 = OpLoad %v2float %arg_2
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %37 = OpLoad %uint %arg_3
+ %36 = OpConvertUToF %float %37
+ %38 = OpCompositeConstruct %v3float %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias|ConstOffset %39 %43
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleBias_87915c
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleBias_87915c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
index ff54de7..e25a562 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_87915c() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl
index 8c4c4ca..0f3e7c5 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl
index 83ce4b8..10dfcf3 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_9dbb51() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl
index 83ce4b8..10dfcf3 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_9dbb51() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
index fcb897f..0a1a04e 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl
@@ -4,10 +4,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleBias_9dbb51() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4);
+ vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1), arg_4);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl
index 811369d..c55ab29 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleBias_9dbb51(texture2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), 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/var/textureSampleBias/9dbb51.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm
index bca222e..d1511f4 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.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
@@ -29,47 +29,48 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %40 = OpConstantNull %v2int
+ %41 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %43 = OpConstantNull %v4float
+ %44 = OpConstantNull %v4float
%textureSampleBias_9dbb51 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %43
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %44
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %32 = OpLoad %v2float %arg_2
- %33 = OpCompositeExtract %float %32 0
- %34 = OpCompositeExtract %float %32 1
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %37 = OpCompositeConstruct %v3float %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %40
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %33 = OpLoad %v2float %arg_2
+ %34 = OpCompositeExtract %float %33 0
+ %35 = OpCompositeExtract %float %33 1
+ %37 = OpLoad %int %arg_3
+ %36 = OpConvertSToF %float %37
+ %38 = OpCompositeConstruct %v3float %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias|ConstOffset %39 %41
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureSampleBias_9dbb51
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureSampleBias_9dbb51
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl
index 4216bf6..8f61e65 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_9dbb51() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl
index 97f7474..dcbacbb 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleBias(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, bias: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleBias_a161cf() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl
index 89d28fc..f9a8c9b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_a161cf() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl
index 89d28fc..f9a8c9b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_a161cf() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
index fc23dd4..315d0e0 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl
@@ -4,9 +4,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleBias_a161cf() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(0), arg_3);
+ vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(1), arg_3);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl
index 26145c4..040f251 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleBias_a161cf(texture2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
- float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int2(0));
+ float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), 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/var/textureSampleBias/a161cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm
index b4513e6..ee1997a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 37
+; Bound: 39
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,36 +28,38 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
+ %20 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %24 = OpTypeSampledImage %3
+ %25 = OpTypeSampledImage %3
%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 = OpConstantNull %v4float
+ %35 = OpConstantNull %v4float
%textureSampleBias_a161cf = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_v4float Function %33
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %35
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %22 = OpLoad %7 %arg_1
- %23 = OpLoad %3 %arg_0
- %25 = OpSampledImage %24 %23 %22
- %26 = OpLoad %v2float %arg_2
- %27 = OpLoad %float %arg_3
- %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias|ConstOffset %27 %30
- OpStore %res %20
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v2float %arg_2
+ %28 = OpLoad %float %arg_3
+ %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias|ConstOffset %28 %32
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %35 = OpLabel
- %36 = OpFunctionCall %void %textureSampleBias_a161cf
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureSampleBias_a161cf
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl
index 2c24a5f..877ccaf 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_a161cf() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
index 666511e..7d318c3 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
index f8272ae..a059def 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_c6953d() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
index f8272ae..a059def 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_c6953d() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
index b06231c..3995304 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
index 966a391..810f45d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.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
OpCapability SampledCubeArray
@@ -30,45 +30,46 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpConstantNull %v4float
+ %42 = OpConstantNull %v4float
%textureSampleBias_c6953d = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %41
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %42
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %34 = OpCompositeExtract %float %31 2
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertUToF %float %36
- %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %35 = OpCompositeExtract %float %32 2
+ %37 = OpLoad %uint %arg_3
+ %36 = OpConvertUToF %float %37
+ %38 = OpCompositeConstruct %v4float %33 %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleBias_c6953d
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleBias_c6953d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
index 31476a4..226af92 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_c6953d() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl
index b862459..f4b1477 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl
index 653f13e..c33134c 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_d3fa1b() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl
index 653f13e..c33134c 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_d3fa1b() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
index 19f7ed4..9045a9b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleBias_d3fa1b() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = texture(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl
index d0ca622..debd918 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm
index efaf608..d3a2da1 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 34
+; Bound: 35
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,33 +28,34 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
+ %20 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %24 = OpTypeSampledImage %3
+ %25 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %30 = OpConstantNull %v4float
+ %31 = OpConstantNull %v4float
%textureSampleBias_d3fa1b = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_v4float Function %30
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_v4float Function %31
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %22 = OpLoad %7 %arg_1
- %23 = OpLoad %3 %arg_0
- %25 = OpSampledImage %24 %23 %22
- %26 = OpLoad %v3float %arg_2
- %27 = OpLoad %float %arg_3
- %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27
- OpStore %res %20
+ %23 = OpLoad %7 %arg_1
+ %24 = OpLoad %3 %arg_0
+ %26 = OpSampledImage %25 %24 %23
+ %27 = OpLoad %v3float %arg_2
+ %28 = OpLoad %float %arg_3
+ %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureSampleBias_d3fa1b
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureSampleBias_d3fa1b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl
index c7a5231..6bbdd3a 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_d3fa1b() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl
index 7c7de5d..e5679f7 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl
index 4c225b0..02d7069 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_eed7c4() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl
index 4c225b0..02d7069 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleBias_eed7c4() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl
index 5017e44..1ff60f1 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm
index 82c77fb..6f53582b 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.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
OpCapability SampledCubeArray
@@ -30,45 +30,46 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
+ %25 = OpConstantNull %float
%v4float = OpTypeVector %float 4
- %29 = OpTypeSampledImage %3
+ %30 = OpTypeSampledImage %3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %41 = OpConstantNull %v4float
+ %42 = OpConstantNull %v4float
%textureSampleBias_eed7c4 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_v4float Function %41
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_v4float Function %42
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %27 = OpLoad %7 %arg_1
- %28 = OpLoad %3 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %34 = OpCompositeExtract %float %31 2
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38
- OpStore %res %25
+ %28 = OpLoad %7 %arg_1
+ %29 = OpLoad %3 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %35 = OpCompositeExtract %float %32 2
+ %37 = OpLoad %int %arg_3
+ %36 = OpConvertSToF %float %37
+ %38 = OpCompositeConstruct %v4float %33 %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleBias_eed7c4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleBias_eed7c4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl
index d5a885b..370747d 100644
--- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleBias_eed7c4() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
index 25c3c54..cbc3437 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
index 88f73a7..5b8163f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_1912e5() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
index 88f73a7..5b8163f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_1912e5() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
index 223d875..b92236a 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
index 1cd357b..4b70484 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -30,43 +30,44 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v4float = OpTypeVector %float 4
%textureSampleCompare_1912e5 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v3float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %34 = OpCompositeExtract %float %31 2
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertUToF %float %36
- %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %35 = OpCompositeExtract %float %32 2
+ %37 = OpLoad %uint %arg_3
+ %36 = OpConvertUToF %float %37
+ %38 = OpCompositeConstruct %v4float %33 %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %38 %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleCompare_1912e5
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleCompare_1912e5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
index c8a2275..6668830 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_1912e5() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl
index e10e503..fe0c27f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl
index 3bc8810..57c2cf9 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_3a5923() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl
index 3bc8810..57c2cf9 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_3a5923() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl
index 3de47a5..0bb26bb 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompare_3a5923() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec3(arg_2, arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl
index a4ccb01..6ca4c0d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm
index b8f13d0..f9f7536 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 31
+; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,30 +28,31 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
- %23 = OpTypeSampledImage %3
+ %20 = OpConstantNull %float
+ %24 = OpTypeSampledImage %3
%textureSampleCompare_3a5923 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_float Function %19
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_float Function %20
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %21 = OpLoad %7 %arg_1
- %22 = OpLoad %3 %arg_0
- %24 = OpSampledImage %23 %22 %21
- %25 = OpLoad %v2float %arg_2
- %26 = OpLoad %float %arg_3
- %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26
- OpStore %res %20
+ %22 = OpLoad %7 %arg_1
+ %23 = OpLoad %3 %arg_0
+ %25 = OpSampledImage %24 %23 %22
+ %26 = OpLoad %v2float %arg_2
+ %27 = OpLoad %float %arg_3
+ %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureSampleCompare_3a5923
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureSampleCompare_3a5923
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl
index 9afca36..bd314d6 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_3a5923() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl
index 02fe640..e9ae16b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl
index 01de180..7d3ca77 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_63fb83() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl
index 01de180..7d3ca77 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_63fb83() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmp(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl
index d83c925..9a48a46 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureSampleCompare_63fb83() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec4(arg_2, arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl
index 826159e..d9fecce 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm
index dde09fd..eab7849 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 31
+; Bound: 32
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,30 +28,31 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
- %23 = OpTypeSampledImage %3
+ %20 = OpConstantNull %float
+ %24 = OpTypeSampledImage %3
%textureSampleCompare_63fb83 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_float Function %19
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_float Function %20
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %21 = OpLoad %7 %arg_1
- %22 = OpLoad %3 %arg_0
- %24 = OpSampledImage %23 %22 %21
- %25 = OpLoad %v3float %arg_2
- %26 = OpLoad %float %arg_3
- %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26
- OpStore %res %20
+ %22 = OpLoad %7 %arg_1
+ %23 = OpLoad %3 %arg_0
+ %25 = OpSampledImage %24 %23 %22
+ %26 = OpLoad %v3float %arg_2
+ %27 = OpLoad %float %arg_3
+ %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureSampleCompare_63fb83
+ %30 = OpLabel
+ %31 = OpFunctionCall %void %textureSampleCompare_63fb83
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl
index b52c590..5a5a765 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_63fb83() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
index 88b89b0..04a3439 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
index e57c768..b198097 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_7b5025() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
index e57c768..b198097 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_7b5025() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
index 1a601d2..4fc5720 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleCompare_7b5025(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0));
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, 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/var/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
index 66b0add..d6a699b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 45
+; Bound: 47
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -29,45 +29,47 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %40 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %42 = OpConstantComposite %v2int %int_1 %int_1
%textureSampleCompare_7b5025 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v2float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %35 = OpLoad %uint %arg_3
- %34 = OpConvertUToF %float %35
- %36 = OpCompositeConstruct %v3float %32 %33 %34
- %37 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %40
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 ConstOffset %42
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleCompare_7b5025
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleCompare_7b5025
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
index a2f8e2d..7df4e6f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_7b5025() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
index 6f2ab25..94aa4fe 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
index 048e28e..6f59515 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_90ae56() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
index 048e28e..6f59515 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_90ae56() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
index aab30eb..1999c7e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompare_90ae56() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
index 5b7cfbd..d88ca51 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
index ccfd3f4..56a26c3 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 42
+; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -29,42 +29,43 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %20 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%textureSampleCompare_90ae56 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_uint Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_uint Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v2float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %35 = OpLoad %uint %arg_3
- %34 = OpConvertUToF %float %35
- %36 = OpCompositeConstruct %v3float %32 %33 %34
- %37 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %uint %arg_3
+ %35 = OpConvertUToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleCompare_90ae56
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleCompare_90ae56
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
index 97cb0eb..dad5b9d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_90ae56() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl
index 4dbfd9c..adb1f55 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl
index 06ac88b..dca9cdf 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_a3ca7e() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl
index 06ac88b..dca9cdf 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_a3ca7e() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl
index 884983e..81e30a3 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
index 8438b3e..14c991b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -30,43 +30,44 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %13 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %17 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v4float = OpTypeVector %float 4
%textureSampleCompare_a3ca7e = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v3float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %34 = OpCompositeExtract %float %31 2
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %37 = OpCompositeConstruct %v4float %32 %33 %34 %35
- %38 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %35 = OpCompositeExtract %float %32 2
+ %37 = OpLoad %int %arg_3
+ %36 = OpConvertSToF %float %37
+ %38 = OpCompositeConstruct %v4float %33 %34 %35 %36
+ %39 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %38 %39
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleCompare_a3ca7e
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleCompare_a3ca7e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
index 3c4c8f1..fa3a6a8 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_a3ca7e() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl
index 9d16686..cde0d28 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl
index ad69564..3a08b41 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_af1051() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl
index ad69564..3a08b41 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_af1051() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl
index e241a74..b1cc778 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleCompare_af1051(depth2d_array<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0));
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, 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/var/textureSampleCompare/af1051.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm
index 290d5fe..36521c5 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 45
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -29,44 +29,45 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %39 = OpConstantNull %v2int
+ %40 = OpConstantComposite %v2int %int_1 %int_1
%textureSampleCompare_af1051 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v2float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %35 = OpLoad %int %arg_3
- %34 = OpConvertSToF %float %35
- %36 = OpCompositeConstruct %v3float %32 %33 %34
- %37 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %39
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %int %arg_3
+ %35 = OpConvertSToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 ConstOffset %40
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureSampleCompare_af1051
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleCompare_af1051
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl
index c2b2635..60fba5e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_af1051() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl
index 67dbb4a..a4d132e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl
index aed9ea3..6a97450 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_dd431d() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl
index aed9ea3..6a97450 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_dd431d() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl
index edba551..69cd114 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl
@@ -4,7 +4,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompare_dd431d() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl
index 525ba3b..d9041fa 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm
index a5fb4fc..4f1f1a0 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 42
+; Bound: 43
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -29,42 +29,43 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %20 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %22 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %24 = OpConstantNull %float
- %28 = OpTypeSampledImage %3
+ %25 = OpConstantNull %float
+ %29 = OpTypeSampledImage %3
%v3float = OpTypeVector %float 3
%textureSampleCompare_dd431d = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_int Function %20
- %arg_4 = OpVariable %_ptr_Function_float Function %24
- %res = OpVariable %_ptr_Function_float Function %24
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_int Function %22
+ %arg_4 = OpVariable %_ptr_Function_float Function %25
+ %res = OpVariable %_ptr_Function_float Function %25
+ OpStore %arg_2 %14
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %26 = OpLoad %7 %arg_1
- %27 = OpLoad %3 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %31 = OpLoad %v2float %arg_2
- %32 = OpCompositeExtract %float %31 0
- %33 = OpCompositeExtract %float %31 1
- %35 = OpLoad %int %arg_3
- %34 = OpConvertSToF %float %35
- %36 = OpCompositeConstruct %v3float %32 %33 %34
- %37 = OpLoad %float %arg_4
- %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37
- OpStore %res %25
+ %27 = OpLoad %7 %arg_1
+ %28 = OpLoad %3 %arg_0
+ %30 = OpSampledImage %29 %28 %27
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpCompositeExtract %float %32 0
+ %34 = OpCompositeExtract %float %32 1
+ %36 = OpLoad %int %arg_3
+ %35 = OpConvertSToF %float %36
+ %37 = OpCompositeConstruct %v3float %33 %34 %35
+ %38 = OpLoad %float %arg_4
+ %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38
+ OpStore %res %26
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleCompare_dd431d
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureSampleCompare_dd431d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl
index 7026776..c973460 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_dd431d() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl
index 4487b72..c479d1e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
fn textureSampleCompare_dec064() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl
index 21bf5e0..b955a0f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_dec064() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl
index 21bf5e0..b955a0f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompare_dec064() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (0).xx);
+ float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (1).xx);
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl
index 8adb0ee..01e9c58 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl
@@ -4,9 +4,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompare_dec064() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0));
+ float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1));
}
void fragment_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl
index c22e9dd..7625b7c 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleCompare_dec064(depth2d<float, access::sample> tint_symbol, sampler tint_symbol_1) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
- float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, int2(0));
+ float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, 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/var/textureSampleCompare/dec064.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm
index 6e55366..9713419 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 34
+; Bound: 36
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -28,33 +28,35 @@
%void = OpTypeVoid
%8 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %13 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %14 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %17 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %19 = OpConstantNull %float
- %23 = OpTypeSampledImage %3
+ %20 = OpConstantNull %float
+ %24 = OpTypeSampledImage %3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %29 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %31 = OpConstantComposite %v2int %int_1 %int_1
%textureSampleCompare_dec064 = OpFunction %void None %8
%11 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %13
- %arg_3 = OpVariable %_ptr_Function_float Function %19
- %res = OpVariable %_ptr_Function_float Function %19
- OpStore %arg_2 %13
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %17
+ %arg_3 = OpVariable %_ptr_Function_float Function %20
+ %res = OpVariable %_ptr_Function_float Function %20
+ OpStore %arg_2 %14
OpStore %arg_3 %float_1
- %21 = OpLoad %7 %arg_1
- %22 = OpLoad %3 %arg_0
- %24 = OpSampledImage %23 %22 %21
- %25 = OpLoad %v2float %arg_2
- %26 = OpLoad %float %arg_3
- %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26 ConstOffset %29
- OpStore %res %20
+ %22 = OpLoad %7 %arg_1
+ %23 = OpLoad %3 %arg_0
+ %25 = OpSampledImage %24 %23 %22
+ %26 = OpLoad %v2float %arg_2
+ %27 = OpLoad %float %arg_3
+ %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27 ConstOffset %31
+ OpStore %res %21
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %8
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureSampleCompare_dec064
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureSampleCompare_dec064
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl
index fdc4189..43246d2 100644
--- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompare_dec064() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl
index 26ae13c..752117a 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl
index dfdafaa..8a156a2 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_1116ed() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl
index dfdafaa..8a156a2 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_1116ed() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
index c5a1359..0383b2e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_1116ed() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
@@ -28,7 +28,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_1116ed() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
@@ -47,7 +47,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_1116ed() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl
index f4bf884..fc084f6 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
index fb2da60..c187ec1 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleCompareLevel_1116ed = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleCompareLevel_1116ed
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
index edd07be..1ef36d7 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_1116ed() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl
index 500b566..b0be6cd 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl
index a0b30fb..fe49ba4 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_1568e3() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl
index a0b30fb..fe49ba4 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_1568e3() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
index d877ce4..d85527c 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureSampleCompareLevel_1568e3() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec4(arg_2, arg_3));
}
@@ -27,7 +27,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureSampleCompareLevel_1568e3() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec4(arg_2, arg_3));
}
@@ -45,7 +45,7 @@
uniform highp samplerCubeShadow arg_0_arg_1;
void textureSampleCompareLevel_1568e3() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec4(arg_2, arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl
index 410b28c..53f4c9c 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
index b0d97d3..db66d65 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureSampleCompareLevel_1568e3 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod %float_0
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod %float_0
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleCompareLevel_1568e3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
index db2ba7c..4952803 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_1568e3() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl
index 5b0bda1..dd93828 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl
index c47f096..b25f1dd 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_2ad2b1() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl
index c47f096..b25f1dd 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_2ad2b1() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
index fb730f0..5e9a77b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_2ad2b1() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec3(arg_2, arg_3));
}
@@ -27,7 +27,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_2ad2b1() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec3(arg_2, arg_3));
}
@@ -45,7 +45,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_2ad2b1() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
float res = texture(arg_0_arg_1, vec3(arg_2, arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
index fb1f7ca..2e023a2 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0));
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
index 58b0090..31ce90d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureSampleCompareLevel_2ad2b1 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod %float_0
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod %float_0
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
index 698fe14..2956adc 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_2ad2b1() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl
index 7496cc6..bff8b92 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl
index 7910d95..109d02d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_4cf3a2() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl
index 7910d95..109d02d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_4cf3a2() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
index 0378014..2bbfa78 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
index e5a6856..fe0d7cd 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleCompareLevel_4cf3a2 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
index 3c4b44a..081c1ec 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_4cf3a2() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
index 1bcb431..fbb9dac 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
index 0283909..90c9f70 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_7dc3c0() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
index 0283909..90c9f70 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_7dc3c0() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
index 88a12ca..7ec21aa 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_7dc3c0() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
@@ -28,7 +28,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_7dc3c0() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
@@ -47,7 +47,7 @@
uniform highp sampler2DArrayShadow arg_0_arg_1;
void textureSampleCompareLevel_7dc3c0() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
index 27a6c6e..817418d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
index e8bacfc..1533c38 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
index b15d2d4..48140b2 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_7dc3c0() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl
index 399dfb5..72bec7b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2<f32>, depth_ref: f32, @const offset: vec2<i32>) -> f32
fn textureSampleCompareLevel_7f2b9a() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl
index 6365c43..a3aea8d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_7f2b9a() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl
index 6365c43..a3aea8d 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_7f2b9a() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl
index 0dcecc2..c600c05 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_7f2b9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0));
+ float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_7f2b9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0));
+ float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleCompareLevel_7f2b9a() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0));
+ float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl
index 12a1172..b552184 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleCompareLevel_7f2b9a(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
- float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0), int2(0));
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm
index 8e4ef7c..6ea24fd 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.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
@@ -45,51 +45,53 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %36 = OpConstantNull %v2int
- %38 = OpTypeFunction %v4float
+ %int_1 = OpConstant %int 1
+ %38 = OpConstantComposite %v2int %int_1 %int_1
+ %40 = OpTypeFunction %v4float
%textureSampleCompareLevel_7f2b9a = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod|ConstOffset %float_0 %36
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod|ConstOffset %float_0 %38
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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 %textureSampleCompareLevel_7f2b9a
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl
index cbb72fd..704668b 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_7f2b9a() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
index b6cd370..82e5958 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
index 052b573..3e709bb 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_958c87() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
index 052b573..3e709bb 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_958c87() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
index bda2ec6..c4f6727 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0));
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
index 6f5a6ae..0ee630f 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleCompareLevel_958c87 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleCompareLevel_958c87
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleCompareLevel_958c87
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleCompareLevel_958c87
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleCompareLevel_958c87
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
index 176df62..01f883a 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_958c87() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl
index 08c8a3a..a9c88a7 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl
index 4358797..ede8cdf 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_b6e47c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl
index 4358797..ede8cdf 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_b6e47c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl
index a20d5d2..a2e73b6 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleCompareLevel_b6e47c(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0));
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm
index 8401e93..26a8b53 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,62 +46,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0
%v2int = OpTypeVector %int 2
- %46 = OpConstantNull %v2int
- %48 = OpTypeFunction %v4float
+ %47 = OpConstantComposite %v2int %int_1 %int_1
+ %49 = OpTypeFunction %v4float
%textureSampleCompareLevel_b6e47c = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %46
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod|ConstOffset %float_0 %47
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl
index 518c525..bc85181 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_b6e47c() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
index b25925f..8778005 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
index a184617..a6bf181 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_bcb3dd() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
index a184617..a6bf181 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerComparisonState arg_1 : register(s1, space1);
void textureSampleCompareLevel_bcb3dd() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
index ece69aa..05c636e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleCompareLevel_bcb3dd(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0));
+ float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
index 3900cd8..9571f9e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,63 +46,65 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %47 = OpConstantNull %v2int
- %49 = OpTypeFunction %v4float
+ %int_1 = OpConstant %int 1
+ %49 = OpConstantComposite %v2int %int_1 %int_1
+ %51 = OpTypeFunction %v4float
%textureSampleCompareLevel_bcb3dd = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %47
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod|ConstOffset %float_0 %49
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %49
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+%vertex_main_inner = OpFunction %v4float None %51
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %55
+ %56 = OpLabel
+ %57 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %57
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
index 1a2974a..c62bf2e 100644
--- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler_comparison;
fn textureSampleCompareLevel_bcb3dd() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl
index 9435ab1..451c787 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleGrad(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleGrad_21402b() {
- var arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
+ var arg_3 = vec3<f32>(1.f);
+ var arg_4 = vec3<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl
index 037d976..5c9e277 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_21402b() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl
index 037d976..5c9e277 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_21402b() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl
index f480d78..594e89c 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_21402b() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -28,9 +28,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_21402b() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -47,9 +47,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_21402b() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl
index 8be83cd..4d88911 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleGrad_21402b(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
- float3 arg_3 = float3(0.0f);
- float3 arg_4 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 arg_3 = float3(1.0f);
+ float3 arg_4 = float3(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm
index 19f41b2..abfec7b 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.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,50 +46,51 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
- %28 = OpTypeSampledImage %11
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
+ %30 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %37 = OpTypeFunction %v4float
%textureSampleGrad_21402b = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- OpStore %arg_3 %20
- OpStore %arg_4 %20
- %26 = OpLoad %14 %arg_1
- %27 = OpLoad %11 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_2
- %31 = OpLoad %v3float %arg_3
- %32 = OpLoad %v3float %arg_4
- %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32
- OpStore %res %25
+ OpStore %arg_2 %21
+ OpStore %arg_3 %21
+ OpStore %arg_4 %21
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %v3float %arg_3
+ %34 = OpLoad %v3float %arg_4
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleGrad_21402b
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSampleGrad_21402b
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 %textureSampleGrad_21402b
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleGrad_21402b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureSampleGrad_21402b
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleGrad_21402b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl
index 4df3828..19b255e 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_21402b() {
- var arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
+ var arg_3 = vec3<f32>(1.0f);
+ var arg_4 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl
index a523499..2d7f8e1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
+ var arg_4 = vec2<f32>(1.f);
+ var arg_5 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl
index 51d6b37..21a8ee8 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_2ecd8f() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl
index 51d6b37..21a8ee8 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_2ecd8f() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl
index 62edc15..b18edb0 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_2ecd8f() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
@@ -29,10 +29,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_2ecd8f() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
@@ -49,10 +49,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_2ecd8f() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl
index 0fc4d01..6dedc05 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_2ecd8f(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 arg_4 = float2(0.0f);
- float2 arg_5 = float2(0.0f);
+ float2 arg_4 = float2(1.0f);
+ float2 arg_5 = float2(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
index adfcab2..435994b 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -47,62 +47,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleGrad_2ecd8f = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
- %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %42 = OpLoad %v2float %arg_4
- %43 = OpLoad %v2float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %v2float %arg_4
+ %45 = OpLoad %v2float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleGrad_2ecd8f
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleGrad_2ecd8f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleGrad_2ecd8f
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleGrad_2ecd8f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleGrad_2ecd8f
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleGrad_2ecd8f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
index 84604a2..04e6328 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_2ecd8f() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
+ var arg_4 = vec2<f32>(1.0f);
+ var arg_5 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl
index d93e938..806c605 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleGrad(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, ddx: vec2<f32>, ddy: vec2<f32>) -> vec4<f32>
fn textureSampleGrad_521263() {
- var arg_2 = vec2<f32>();
- var arg_3 = vec2<f32>();
- var arg_4 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
+ var arg_3 = vec2<f32>(1.f);
+ var arg_4 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl
index b184cd7..bfe8460 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_521263() {
- float2 arg_2 = (0.0f).xx;
- float2 arg_3 = (0.0f).xx;
- float2 arg_4 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
+ float2 arg_3 = (1.0f).xx;
+ float2 arg_4 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl
index b184cd7..bfe8460 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_521263() {
- float2 arg_2 = (0.0f).xx;
- float2 arg_3 = (0.0f).xx;
- float2 arg_4 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
+ float2 arg_3 = (1.0f).xx;
+ float2 arg_4 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl
index eb7aee0..0e9fd5c 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_521263() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -28,9 +28,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_521263() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -47,9 +47,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_521263() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl
index 89f9e87..1494a9c 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleGrad_521263(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
- float2 arg_3 = float2(0.0f);
- float2 arg_4 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
+ float2 arg_3 = float2(1.0f);
+ float2 arg_4 = float2(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm
index 5b90d6c..50b4b51 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.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,50 +46,51 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
- %28 = OpTypeSampledImage %11
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
+ %30 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %37 = OpTypeFunction %v4float
%textureSampleGrad_521263 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- OpStore %arg_3 %20
- OpStore %arg_4 %20
- %26 = OpLoad %14 %arg_1
- %27 = OpLoad %11 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_2
- %31 = OpLoad %v2float %arg_3
- %32 = OpLoad %v2float %arg_4
- %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32
- OpStore %res %25
+ OpStore %arg_2 %21
+ OpStore %arg_3 %21
+ OpStore %arg_4 %21
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %v2float %arg_3
+ %34 = OpLoad %v2float %arg_4
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleGrad_521263
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSampleGrad_521263
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 %textureSampleGrad_521263
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleGrad_521263
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureSampleGrad_521263
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleGrad_521263
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl
index 25a3852..025d0d7 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_521263() {
- var arg_2 = vec2<f32>();
- var arg_3 = vec2<f32>();
- var arg_4 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
+ var arg_3 = vec2<f32>(1.0f);
+ var arg_4 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl
index 4cd7722..53c0a00 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleGrad(texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>, ddx: vec3<f32>, ddy: vec3<f32>) -> vec4<f32>
fn textureSampleGrad_5312f4() {
- var arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
+ var arg_3 = vec3<f32>(1.f);
+ var arg_4 = vec3<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl
index 14508e1..61b7b3b 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_5312f4() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl
index 14508e1..61b7b3b 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_5312f4() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl
index 7278ce3..ce0c150 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleGrad_5312f4() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -28,9 +28,9 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleGrad_5312f4() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
@@ -47,9 +47,9 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleGrad_5312f4() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl
index d7f4659..dcb72de 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleGrad_5312f4(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
- float3 arg_3 = float3(0.0f);
- float3 arg_4 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
+ float3 arg_3 = float3(1.0f);
+ float3 arg_4 = float3(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradientcube(arg_3, arg_4));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm
index 149aba6..bbb5adb 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.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,50 +46,51 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
- %28 = OpTypeSampledImage %11
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
+ %30 = OpTypeSampledImage %11
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %37 = OpTypeFunction %v4float
%textureSampleGrad_5312f4 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- OpStore %arg_3 %20
- OpStore %arg_4 %20
- %26 = OpLoad %14 %arg_1
- %27 = OpLoad %11 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_2
- %31 = OpLoad %v3float %arg_3
- %32 = OpLoad %v3float %arg_4
- %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32
- OpStore %res %25
+ OpStore %arg_2 %21
+ OpStore %arg_3 %21
+ OpStore %arg_4 %21
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %v3float %arg_3
+ %34 = OpLoad %v3float %arg_4
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleGrad_5312f4
+%vertex_main_inner = OpFunction %v4float None %37
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureSampleGrad_5312f4
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 %textureSampleGrad_5312f4
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleGrad_5312f4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureSampleGrad_5312f4
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleGrad_5312f4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl
index f4175ba..58801e8 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_5312f4() {
- var arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
+ var arg_3 = vec3<f32>(1.0f);
+ var arg_4 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl
index 082cf54..8f3892c 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
- const arg_5 = vec3<i32>();
+ var arg_2 = vec3<f32>(1.f);
+ var arg_3 = vec3<f32>(1.f);
+ var arg_4 = vec3<f32>(1.f);
+ const arg_5 = vec3<i32>(1i);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl
index 695dd30..05ae8f1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_5884dd() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
- float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xxx);
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xxx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl
index 695dd30..05ae8f1 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_5884dd() {
- float3 arg_2 = (0.0f).xxx;
- float3 arg_3 = (0.0f).xxx;
- float3 arg_4 = (0.0f).xxx;
- float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xxx);
+ float3 arg_2 = (1.0f).xxx;
+ float3 arg_3 = (1.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xxx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl
index a20b4b4..c3bafa5 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_5884dd() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0));
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_5884dd() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0));
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleGrad_5884dd() {
- vec3 arg_2 = vec3(0.0f);
- vec3 arg_3 = vec3(0.0f);
- vec3 arg_4 = vec3(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0));
+ vec3 arg_2 = vec3(1.0f);
+ vec3 arg_3 = vec3(1.0f);
+ vec3 arg_4 = vec3(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl
index 87a518a..b9f3bf6 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_5884dd(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
- float3 arg_3 = float3(0.0f);
- float3 arg_4 = float3(0.0f);
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4), int3(0));
+ float3 arg_2 = float3(1.0f);
+ float3 arg_3 = float3(1.0f);
+ float3 arg_4 = float3(1.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4), int3(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm
index cfe63eb..a0799ad 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,53 +46,55 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
- %28 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v3float
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %35 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %38 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleGrad_5884dd = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_v3float Function %20
- %arg_4 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- OpStore %arg_3 %20
- OpStore %arg_4 %20
- %26 = OpLoad %14 %arg_1
- %27 = OpLoad %11 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v3float %arg_2
- %31 = OpLoad %v3float %arg_3
- %32 = OpLoad %v3float %arg_4
- %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad|ConstOffset %31 %32 %35
- OpStore %res %25
+ OpStore %arg_2 %21
+ OpStore %arg_3 %21
+ OpStore %arg_4 %21
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %v3float %arg_3
+ %34 = OpLoad %v3float %arg_4
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad|ConstOffset %33 %34 %38
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleGrad_5884dd
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleGrad_5884dd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureSampleGrad_5884dd
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleGrad_5884dd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleGrad_5884dd
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleGrad_5884dd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl
index 9a43b69..bd81e44 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_5884dd() {
- var arg_2 = vec3<f32>();
- var arg_3 = vec3<f32>();
- var arg_4 = vec3<f32>();
- const arg_5 = vec3<i32>();
+ var arg_2 = vec3<f32>(1.0f);
+ var arg_3 = vec3<f32>(1.0f);
+ var arg_4 = vec3<f32>(1.0f);
+ const arg_5 = vec3<i32>(1i);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
index d77c4f5..ca3e634 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl
@@ -25,11 +25,11 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
- const arg_6 = vec2<i32>();
+ var arg_4 = vec2<f32>(1.f);
+ var arg_5 = vec2<f32>(1.f);
+ const arg_6 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
index 9bbb852..30e5c08 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl
@@ -2,11 +2,11 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_7cd6de() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
index 9bbb852..30e5c08 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl
@@ -2,11 +2,11 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_7cd6de() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
index 876815f..d8c267f 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl
@@ -3,11 +3,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_7cd6de() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
vec4 vertex_main() {
@@ -29,11 +29,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_7cd6de() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
void fragment_main() {
@@ -49,11 +49,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_7cd6de() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
index b8f980b..00d9c11 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl
@@ -2,11 +2,11 @@
using namespace metal;
void textureSampleGrad_7cd6de(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float2 arg_4 = float2(0.0f);
- float2 arg_5 = float2(0.0f);
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0));
+ float2 arg_4 = float2(1.0f);
+ float2 arg_5 = float2(1.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
index 174acb5..c44f828 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 63
+; Bound: 65
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -47,65 +47,67 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %46 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %49 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %49 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleGrad_7cd6de = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
- %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %42 = OpLoad %v2float %arg_4
- %43 = OpLoad %v2float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %46
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %v2float %arg_4
+ %45 = OpLoad %v2float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad|ConstOffset %44 %45 %49
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %49
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleGrad_7cd6de
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleGrad_7cd6de
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %55
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleGrad_7cd6de
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %61 = OpLabel
- %62 = OpFunctionCall %void %textureSampleGrad_7cd6de
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleGrad_7cd6de
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
index 96e7b81..ecdd746 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl
@@ -3,11 +3,11 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_7cd6de() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
- const arg_6 = vec2<i32>();
+ var arg_4 = vec2<f32>(1.0f);
+ var arg_5 = vec2<f32>(1.0f);
+ const arg_6 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
index b741911..4ece919 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
+ var arg_4 = vec2<f32>(1.f);
+ var arg_5 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
index 408ec2f..b77b05f 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_a09131() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
index 408ec2f..b77b05f 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_a09131() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
index ce8038c..931674d 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_a09131() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
@@ -29,10 +29,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_a09131() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
@@ -49,10 +49,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_a09131() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
index 1065f83..54fa329 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_a09131(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float2 arg_4 = float2(0.0f);
- float2 arg_5 = float2(0.0f);
+ float2 arg_4 = float2(1.0f);
+ float2 arg_5 = float2(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
index 031b5d1..013b899 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -47,62 +47,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleGrad_a09131 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
- %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %42 = OpLoad %v2float %arg_4
- %43 = OpLoad %v2float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %v2float %arg_4
+ %45 = OpLoad %v2float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleGrad_a09131
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleGrad_a09131
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleGrad_a09131
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleGrad_a09131
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleGrad_a09131
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleGrad_a09131
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
index b15bd3a..c358991 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_a09131() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
+ var arg_4 = vec2<f32>(1.0f);
+ var arg_5 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
index 0df48a1..911b398 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
- var arg_4 = vec3<f32>();
- var arg_5 = vec3<f32>();
+ var arg_4 = vec3<f32>(1.f);
+ var arg_5 = vec3<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
index da308d6..fbe11fc 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_bbb58f() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
- float3 arg_4 = (0.0f).xxx;
- float3 arg_5 = (0.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float3 arg_5 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
index da308d6..fbe11fc 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_bbb58f() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
- float3 arg_4 = (0.0f).xxx;
- float3 arg_5 = (0.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float3 arg_5 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
index 53879d7..ec2e05e 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_bbb58f(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
- float3 arg_4 = float3(0.0f);
- float3 arg_5 = float3(0.0f);
+ float3 arg_4 = float3(1.0f);
+ float3 arg_5 = float3(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
index 4905a93..f95babe 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -48,62 +48,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleGrad_bbb58f = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_v3float Function %20
- %arg_5 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_2
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %42 = OpLoad %v3float %arg_4
- %43 = OpLoad %v3float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %v3float %arg_4
+ %45 = OpLoad %v3float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleGrad_bbb58f
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleGrad_bbb58f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleGrad_bbb58f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleGrad_bbb58f
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleGrad_bbb58f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
index 2419db8..e05c270 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_bbb58f() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
- var arg_4 = vec3<f32>();
- var arg_5 = vec3<f32>();
+ var arg_4 = vec3<f32>(1.0f);
+ var arg_5 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl
index d612765..2fc3391 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
- var arg_3 = vec2<f32>();
- var arg_4 = vec2<f32>();
- const arg_5 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.f);
+ var arg_3 = vec2<f32>(1.f);
+ var arg_4 = vec2<f32>(1.f);
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl
index 203eca8..411191f 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_d4e3c5() {
- float2 arg_2 = (0.0f).xx;
- float2 arg_3 = (0.0f).xx;
- float2 arg_4 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float2 arg_3 = (1.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl
index 203eca8..411191f 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_d4e3c5() {
- float2 arg_2 = (0.0f).xx;
- float2 arg_3 = (0.0f).xx;
- float2 arg_4 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xx);
+ float2 arg_2 = (1.0f).xx;
+ float2 arg_3 = (1.0f).xx;
+ float2 arg_4 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl
index a772706..fbc2291 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_d4e3c5() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_d4e3c5() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleGrad_d4e3c5() {
- vec2 arg_2 = vec2(0.0f);
- vec2 arg_3 = vec2(0.0f);
- vec2 arg_4 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0));
+ vec2 arg_2 = vec2(1.0f);
+ vec2 arg_3 = vec2(1.0f);
+ vec2 arg_4 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl
index 166bab5..8a6867e 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_d4e3c5(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
- float2 arg_3 = float2(0.0f);
- float2 arg_4 = float2(0.0f);
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4), int2(0));
+ float2 arg_2 = float2(1.0f);
+ float2 arg_3 = float2(1.0f);
+ float2 arg_4 = float2(1.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm
index 817905a..08693ff 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,53 +46,55 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
- %28 = OpTypeSampledImage %11
+ %24 = OpConstantNull %v2float
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %35 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %38 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleGrad_d4e3c5 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_v2float Function %20
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
- OpStore %arg_3 %20
- OpStore %arg_4 %20
- %26 = OpLoad %14 %arg_1
- %27 = OpLoad %11 %arg_0
- %29 = OpSampledImage %28 %27 %26
- %30 = OpLoad %v2float %arg_2
- %31 = OpLoad %v2float %arg_3
- %32 = OpLoad %v2float %arg_4
- %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad|ConstOffset %31 %32 %35
- OpStore %res %25
+ OpStore %arg_2 %21
+ OpStore %arg_3 %21
+ OpStore %arg_4 %21
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %v2float %arg_3
+ %34 = OpLoad %v2float %arg_4
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad|ConstOffset %33 %34 %38
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleGrad_d4e3c5
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleGrad_d4e3c5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureSampleGrad_d4e3c5
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleGrad_d4e3c5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleGrad_d4e3c5
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleGrad_d4e3c5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl
index 47a0090..8989eb7 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_d4e3c5() {
- var arg_2 = vec2<f32>();
- var arg_3 = vec2<f32>();
- var arg_4 = vec2<f32>();
- const arg_5 = vec2<i32>();
+ var arg_2 = vec2<f32>(1.0f);
+ var arg_3 = vec2<f32>(1.0f);
+ var arg_4 = vec2<f32>(1.0f);
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl
index 165faad..f198c4e 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl
@@ -25,11 +25,11 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
- const arg_6 = vec2<i32>();
+ var arg_4 = vec2<f32>(1.f);
+ var arg_5 = vec2<f32>(1.f);
+ const arg_6 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl
index 91e62c1..62d6d63 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl
@@ -2,11 +2,11 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_d65515() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl
index 91e62c1..62d6d63 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl
@@ -2,11 +2,11 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_d65515() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float2 arg_4 = (0.0f).xx;
- float2 arg_5 = (0.0f).xx;
- float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx);
+ float2 arg_4 = (1.0f).xx;
+ float2 arg_5 = (1.0f).xx;
+ float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl
index 31c47a2..8c93957 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl
@@ -3,11 +3,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_d65515() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
vec4 vertex_main() {
@@ -29,11 +29,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_d65515() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
void fragment_main() {
@@ -49,11 +49,11 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleGrad_d65515() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- vec2 arg_4 = vec2(0.0f);
- vec2 arg_5 = vec2(0.0f);
- vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0));
+ vec2 arg_4 = vec2(1.0f);
+ vec2 arg_5 = vec2(1.0f);
+ vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl
index ad234a0..cf94801 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl
@@ -2,11 +2,11 @@
using namespace metal;
void textureSampleGrad_d65515(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float2 arg_4 = float2(0.0f);
- float2 arg_5 = float2(0.0f);
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0));
+ float2 arg_4 = float2(1.0f);
+ float2 arg_5 = float2(1.0f);
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm
index 274c793..f99de76 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -47,64 +47,65 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %45 = OpConstantNull %v2int
+ %47 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %50 = OpTypeFunction %v4float
%textureSampleGrad_d65515 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_v2float Function %20
- %arg_5 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v2float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %42 = OpLoad %v2float %arg_4
- %43 = OpLoad %v2float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %45
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %v2float %arg_4
+ %45 = OpLoad %v2float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad|ConstOffset %44 %45 %47
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleGrad_d65515
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleGrad_d65515
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleGrad_d65515
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleGrad_d65515
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureSampleGrad_d65515
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureSampleGrad_d65515
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl
index 1397fcf..30244fd 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl
@@ -3,11 +3,11 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_d65515() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- var arg_4 = vec2<f32>();
- var arg_5 = vec2<f32>();
- const arg_6 = vec2<i32>();
+ var arg_4 = vec2<f32>(1.0f);
+ var arg_5 = vec2<f32>(1.0f);
+ const arg_6 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl
index ff1e7cf..9100f4d 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
- var arg_4 = vec3<f32>();
- var arg_5 = vec3<f32>();
+ var arg_4 = vec3<f32>(1.f);
+ var arg_5 = vec3<f32>(1.f);
var res: vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl
index 1f111fb..bb27c4d 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_e383db() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
- float3 arg_4 = (0.0f).xxx;
- float3 arg_5 = (0.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float3 arg_5 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl
index 1f111fb..bb27c4d 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleGrad_e383db() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
- float3 arg_4 = (0.0f).xxx;
- float3 arg_5 = (0.0f).xxx;
+ float3 arg_4 = (1.0f).xxx;
+ float3 arg_5 = (1.0f).xxx;
float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl
index e452422..dcd5806 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleGrad_e383db(texturecube_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
- float3 arg_4 = float3(0.0f);
- float3 arg_5 = float3(0.0f);
+ float3 arg_4 = float3(1.0f);
+ float3 arg_5 = float3(1.0f);
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5));
}
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm
index b63df46..206ee79 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -48,62 +48,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleGrad_e383db = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_v3float Function %20
- %arg_5 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_5 = OpVariable %_ptr_Function_v3float Function %24
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- OpStore %arg_4 %20
- OpStore %arg_5 %20
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_2
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %42 = OpLoad %v3float %arg_4
- %43 = OpLoad %v3float %arg_5
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43
- OpStore %res %30
+ OpStore %arg_4 %21
+ OpStore %arg_5 %21
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %v3float %arg_4
+ %45 = OpLoad %v3float %arg_5
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleGrad_e383db
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleGrad_e383db
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleGrad_e383db
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleGrad_e383db
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleGrad_e383db
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleGrad_e383db
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl
index 792b22d..e4f9c71 100644
--- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleGrad_e383db() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
- var arg_4 = vec3<f32>();
- var arg_5 = vec3<f32>();
+ var arg_4 = vec3<f32>(1.0f);
+ var arg_5 = vec3<f32>(1.0f);
var res : vec4<f32> = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl
index 5b14236..cf57717 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl
index d3cce44..ce6b9cd 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_02be59() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl
index d3cce44..ce6b9cd 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_02be59() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl
index b24ee0b..ecada9c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_02be59() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
@@ -27,7 +27,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_02be59() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
@@ -45,7 +45,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_02be59() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl
index a3aee72..d40c8b3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm
index 4d6810d..2a9f874 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,53 +45,54 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %34 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %39 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleLevel_02be59 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v2float %arg_2
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v2float %arg_2
+ %38 = OpLoad %int %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleLevel_02be59
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_02be59
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_02be59
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_02be59
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_02be59
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleLevel_02be59
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl
index cab9d73..3596bc5 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_02be59() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl
index 2a9a9c7..6755159 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleLevel(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, level: f32, @const offset: vec2<i32>) -> vec4<f32>
fn textureSampleLevel_0b0a1b() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl
index d57bb5e..905839c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_0b0a1b() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl
index d57bb5e..905839c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_0b0a1b() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl
index 1562346..07d5757 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_0b0a1b() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_0b0a1b() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_0b0a1b() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl
index 5aec41a..8f75c79 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleLevel_0b0a1b(texture2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0));
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm
index 128e2c9..aeac662 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.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
@@ -45,51 +45,53 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %35 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %37 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%textureSampleLevel_0b0a1b = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod|ConstOffset %32 %35
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod|ConstOffset %33 %37
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleLevel_0b0a1b
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleLevel_0b0a1b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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 %textureSampleLevel_0b0a1b
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_0b0a1b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureSampleLevel_0b0a1b
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_0b0a1b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl
index cfa94cf..2ec980a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_0b0a1b() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl
index a7858f0..b02c9c6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl
index fd1c612..a8e6b49 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_0bdd9a() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl
index fd1c612..a8e6b49 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_0bdd9a() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl
index 1a157e0..8a29dcc 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
index 31adb35..c8663d9 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleLevel_0bdd9a = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_0bdd9a
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_0bdd9a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_0bdd9a
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_0bdd9a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_0bdd9a
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_0bdd9a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
index 554139b..c3d8c93 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_0bdd9a() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl
index 9717bef..51222b0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl
index 4126c93..b4f563f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_1b0291() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl
index 4126c93..b4f563f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_1b0291() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl
index 780a19c..0aeb5a1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm
index 0ce4354..97476be 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,53 +45,54 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %34 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %39 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleLevel_1b0291 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_2
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_2
+ %38 = OpLoad %int %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleLevel_1b0291
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_1b0291
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_1b0291
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_1b0291
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_1b0291
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleLevel_1b0291
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl
index 979eb55..859e5f4 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_1b0291() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl
index 1807e7f..4f106f7 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl
index 745e694..aebf22d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_1bf73e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl
index 745e694..aebf22d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_1bf73e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl
index f6e0ca1..86811a4 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
int arg_4 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm
index 8bc6559..2ac3b75 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleLevel_1bf73e = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %int_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %43 = OpLoad %int %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %45 = OpLoad %int %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_1bf73e
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleLevel_1bf73e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleLevel_1bf73e
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_1bf73e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleLevel_1bf73e
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleLevel_1bf73e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl
index 82a8adc..f286a51 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_1bf73e() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
index 20ae0d8..0ad52fb 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
index b5bdc03..ad30972 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_265cc7() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
index b5bdc03..ad30972 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_265cc7() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
index e6ee969..0d6741f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_265cc7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -28,7 +28,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_265cc7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -47,7 +47,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_265cc7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
index 87765ee..81fc96a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
index 1c0eae9..dfbca6a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleLevel_265cc7 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_265cc7
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_265cc7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_265cc7
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_265cc7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_265cc7
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_265cc7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
index d46530b..44e2223 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_265cc7() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl
index afaddb5..3112aef 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl
index 22626f8..21e3ab2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_2974eb() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl
index 22626f8..21e3ab2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_2974eb() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl
index 8c3cf62..c665c33 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
uint arg_4 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm
index 05d6dc5..0262bb6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.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
OpMemoryModel Logical GLSL450
@@ -46,65 +46,66 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %32 = OpConstantNull %uint
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %uint
+ %39 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %50 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleLevel_2974eb = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %32
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %uint_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %40 = OpLoad %v2float %arg_2
- %41 = OpCompositeExtract %float %40 0
- %42 = OpCompositeExtract %float %40 1
- %44 = OpLoad %int %arg_3
- %43 = OpConvertSToF %float %44
- %45 = OpCompositeConstruct %v3float %41 %42 %43
- %47 = OpLoad %uint %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %42 = OpLoad %v2float %arg_2
+ %43 = OpCompositeExtract %float %42 0
+ %44 = OpCompositeExtract %float %42 1
+ %46 = OpLoad %int %arg_3
+ %45 = OpConvertSToF %float %46
+ %47 = OpCompositeConstruct %v3float %43 %44 %45
+ %49 = OpLoad %uint %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %50
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureSampleLevel_2974eb
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_2974eb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %56
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleLevel_2974eb
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_2974eb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %62 = OpLabel
- %63 = OpFunctionCall %void %textureSampleLevel_2974eb
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleLevel_2974eb
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl
index 3d501ea..5785bac 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_2974eb() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl
index f7a6b3b..5d4fa18 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl
index 997a9e9..349d78a1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_302be4() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl
index 997a9e9..349d78a1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_302be4() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl
index faded30..c808922 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_302be4() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -28,7 +28,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_302be4() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
@@ -47,7 +47,7 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_302be4() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl
index ec28870..3e68abc 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm
index bebc87f..4f760f9 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,60 +46,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleLevel_302be4 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_302be4
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_302be4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_302be4
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_302be4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_302be4
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_302be4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl
index 00560c0..d70cb89 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_302be4() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl
index ea0e79f..109df30 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl
index f746f37..631b705 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_36780e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
int arg_4 = 1;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl
index f746f37..631b705 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_36780e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
int arg_4 = 1;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl
index 8f31669..53ffa0d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_36780e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
int arg_4 = 1;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm
index 284fa74..4e64bdd 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,63 +46,64 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %45 = OpConstantNull %v2int
+ %47 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %48 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %50 = OpTypeFunction %v4float
%textureSampleLevel_36780e = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %int_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %43 = OpLoad %int %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %45
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %45 = OpLoad %int %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %47
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleLevel_36780e
+%vertex_main_inner = OpFunction %v4float None %50
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleLevel_36780e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %55 = OpLabel
+ %56 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %56
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_36780e
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_36780e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureSampleLevel_36780e
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %textureSampleLevel_36780e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl
index e299691..efa2a14 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_36780e() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl
index c03589d..d9222e8 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl
index 15d3909..8959ed2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_36f0d3() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
uint arg_4 = 1u;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl
index 15d3909..8959ed2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_36f0d3() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
uint arg_4 = 1u;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl
index 253a816..f7c22f2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_36f0d3(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
uint arg_4 = 1u;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm
index c672f18..612754f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 66
+; Bound: 67
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,67 +46,68 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %32 = OpConstantNull %uint
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %uint
+ %39 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %49 = OpConstantNull %v2int
+ %51 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %52 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %54 = OpTypeFunction %v4float
%textureSampleLevel_36f0d3 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %32
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %uint_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %40 = OpLoad %v2float %arg_2
- %41 = OpCompositeExtract %float %40 0
- %42 = OpCompositeExtract %float %40 1
- %44 = OpLoad %int %arg_3
- %43 = OpConvertSToF %float %44
- %45 = OpCompositeConstruct %v3float %41 %42 %43
- %47 = OpLoad %uint %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod|ConstOffset %46 %49
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %42 = OpLoad %v2float %arg_2
+ %43 = OpCompositeExtract %float %42 0
+ %44 = OpCompositeExtract %float %42 1
+ %46 = OpLoad %int %arg_3
+ %45 = OpConvertSToF %float %46
+ %47 = OpCompositeConstruct %v3float %43 %44 %45
+ %49 = OpLoad %uint %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod|ConstOffset %48 %51
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %52
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_36f0d3
+%vertex_main_inner = OpFunction %v4float None %54
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_36f0d3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %58
+ %59 = OpLabel
+ %60 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %60
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %61 = OpLabel
- %62 = OpFunctionCall %void %textureSampleLevel_36f0d3
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureSampleLevel_36f0d3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %64 = OpLabel
- %65 = OpFunctionCall %void %textureSampleLevel_36f0d3
+ %65 = OpLabel
+ %66 = OpFunctionCall %void %textureSampleLevel_36f0d3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl
index 5812a97..b7aa845 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_36f0d3() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl
index bca9bb7..b971e4d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl
index d26576d..3865538 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_3c3442() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl
index d26576d..3865538 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_3c3442() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl
index 35a4af2..93bd50c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
int arg_4 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm
index 764f969..1fa0e90 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.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
OpMemoryModel Logical GLSL450
@@ -46,65 +46,66 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %32 = OpConstantNull %int
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %int
+ %39 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %50 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleLevel_3c3442 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %32
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %int_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %40 = OpLoad %v2float %arg_2
- %41 = OpCompositeExtract %float %40 0
- %42 = OpCompositeExtract %float %40 1
- %44 = OpLoad %uint %arg_3
- %43 = OpConvertUToF %float %44
- %45 = OpCompositeConstruct %v3float %41 %42 %43
- %47 = OpLoad %int %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %42 = OpLoad %v2float %arg_2
+ %43 = OpCompositeExtract %float %42 0
+ %44 = OpCompositeExtract %float %42 1
+ %46 = OpLoad %uint %arg_3
+ %45 = OpConvertUToF %float %46
+ %47 = OpCompositeConstruct %v3float %43 %44 %45
+ %49 = OpLoad %int %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %50
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureSampleLevel_3c3442
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_3c3442
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %56
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleLevel_3c3442
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_3c3442
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %62 = OpLabel
- %63 = OpFunctionCall %void %textureSampleLevel_3c3442
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleLevel_3c3442
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl
index 2196df7..0320df3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_3c3442() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
index e158313..9a88375 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
index cbc17e9..a581ba2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_615583() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
index cbc17e9..a581ba2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_615583() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
index 34af000..a162e3a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
index 68e107d..6f3511f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,61 +46,62 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%_ptr_Function_float = OpTypePointer Function %float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleLevel_615583 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %uint_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %43 = OpLoad %uint %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %45 = OpLoad %uint %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_615583
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleLevel_615583
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleLevel_615583
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_615583
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleLevel_615583
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleLevel_615583
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
index 0c0d65d..1c573ad 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_615583() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
index 077d173..d5a1e74 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
index e381e9f..8e507ed 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_73e892() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
index e381e9f..8e507ed 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_73e892() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
index 14e1df9..d634058 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_73e892() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
@@ -27,7 +27,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_73e892() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
@@ -45,7 +45,7 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_73e892() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
index 4eb86fb..fd1ebab 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
index 1c0551a..88bb69b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,53 +45,54 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %34 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %39 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleLevel_73e892 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v2float %arg_2
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v2float %arg_2
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleLevel_73e892
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_73e892
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_73e892
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_73e892
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_73e892
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleLevel_73e892
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
index 1d25212..e61a548 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_73e892() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl
index f9bcd90..cb1b048 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: i32, @const offset: vec2<i32>) -> f32
fn textureSampleLevel_749baf() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl
index 0431b6e1..9e1020a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_749baf() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl
index 0431b6e1..9e1020a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_749baf() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
- float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl
index e6a0500..f2fbbd3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_749baf() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_749baf() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_749baf() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl
index 2802a73..dbd714d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleLevel_749baf(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm
index 93494bd..2a9f5e2 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,55 +45,56 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %34 = OpTypeSampledImage %11
%v2int = OpTypeVector %int 2
- %38 = OpConstantNull %v2int
+ %40 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %41 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %43 = OpTypeFunction %v4float
%textureSampleLevel_749baf = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v2float %arg_2
- %36 = OpLoad %int %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %38
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v2float %arg_2
+ %38 = OpLoad %int %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod|ConstOffset %37 %40
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %41
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleLevel_749baf
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureSampleLevel_749baf
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %47
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleLevel_749baf
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_749baf
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %void %textureSampleLevel_749baf
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_749baf
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl
index c9215b1..80a39fb 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_749baf() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
index 0a8b7ad..13fd205 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
index ded6e21..1d07f98 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_941a53() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
index ded6e21..1d07f98 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_941a53() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
index 4bbcda9..17b58e6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
uint arg_4 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
index b6f33ce..f725458 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,61 +47,62 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleLevel_941a53 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %uint_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_2
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %43 = OpLoad %uint %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %45 = OpLoad %uint %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_941a53
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleLevel_941a53
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleLevel_941a53
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_941a53
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleLevel_941a53
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleLevel_941a53
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
index 02a28c8..118ea63 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_941a53() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl
index a54008b..2bcb61c 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl
@@ -25,7 +25,7 @@
// fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
fn textureSampleLevel_979816() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl
index 42293b9..115d746 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl
@@ -85,7 +85,7 @@
}
void textureSampleLevel_979816() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl
index 42293b9..115d746 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl
@@ -85,7 +85,7 @@
}
void textureSampleLevel_979816() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl
index 45fab17..6364e84 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl
@@ -54,7 +54,7 @@
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
void textureSampleLevel_979816() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
@@ -124,7 +124,7 @@
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
void textureSampleLevel_979816() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
@@ -188,7 +188,7 @@
uniform highp sampler2D arg_0_arg_1;
uniform highp sampler2D ext_tex_plane_1_arg_1;
void textureSampleLevel_979816() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl
index efa8279..c9d722e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl
@@ -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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, arg_2, *(tint_symbol_4));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm
index 4d772dc..58d2130 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm
@@ -5,7 +5,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 147
+; Bound: 148
; Schema: 0
OpCapability Shader
%31 = OpExtInstImport "GLSL.std.450"
@@ -124,12 +124,13 @@
%98 = OpConstantNull %uint
%void = OpTypeVoid
%116 = OpTypeFunction %void
- %120 = OpConstantNull %v2float
+ %120 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %123 = OpConstantNull %v2float
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %134 = OpTypeFunction %v4float
+ %135 = OpTypeFunction %v4float
%gammaCorrection = OpFunction %v3float None %25
%v = OpFunctionParameter %v3float
%params = OpFunctionParameter %GammaTransferParams
@@ -227,38 +228,38 @@
OpFunctionEnd
%textureSampleLevel_979816 = OpFunction %void None %116
%119 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %120
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %123
%res = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_2 %120
- %124 = OpLoad %11 %arg_0
- %125 = OpLoad %11 %ext_tex_plane_1
- %126 = OpLoad %24 %arg_1
- %127 = OpLoad %v2float %arg_2
- %130 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
- %131 = OpLoad %ExternalTextureParams %130
- %123 = OpFunctionCall %v4float %textureSampleExternal %124 %125 %126 %127 %131
- OpStore %res %123
+ %125 = OpLoad %11 %arg_0
+ %126 = OpLoad %11 %ext_tex_plane_1
+ %127 = OpLoad %24 %arg_1
+ %128 = OpLoad %v2float %arg_2
+ %131 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0
+ %132 = OpLoad %ExternalTextureParams %131
+ %124 = OpFunctionCall %v4float %textureSampleExternal %125 %126 %127 %128 %132
+ OpStore %res %124
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %134
- %136 = OpLabel
- %137 = OpFunctionCall %void %textureSampleLevel_979816
+%vertex_main_inner = OpFunction %v4float None %135
+ %137 = OpLabel
+ %138 = OpFunctionCall %void %textureSampleLevel_979816
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %116
- %139 = OpLabel
- %140 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %140
+ %140 = OpLabel
+ %141 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %141
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %116
- %142 = OpLabel
- %143 = OpFunctionCall %void %textureSampleLevel_979816
+ %143 = OpLabel
+ %144 = OpFunctionCall %void %textureSampleLevel_979816
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %116
- %145 = OpLabel
- %146 = OpFunctionCall %void %textureSampleLevel_979816
+ %146 = OpLabel
+ %147 = OpFunctionCall %void %textureSampleLevel_979816
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl
index 1b4da99..ca58ef1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl
@@ -7,7 +7,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_979816() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl
index 6a38486..7d6e3ff 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl
index 25a17d6..87c53a0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_a12142() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl
index 25a17d6..87c53a0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_a12142() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
uint arg_4 = 1u;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl
index e8b772e..f3d6ea6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
uint arg_4 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm
index ebde5f0..60fe8b6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.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 SampledCubeArray
@@ -47,65 +47,66 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
+ %29 = OpConstantNull %int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %32 = OpConstantNull %uint
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %uint
+ %39 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %50 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleLevel_a12142 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %32
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %uint_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %39 = OpLoad %v3float %arg_2
- %40 = OpCompositeExtract %float %39 0
- %41 = OpCompositeExtract %float %39 1
- %42 = OpCompositeExtract %float %39 2
- %44 = OpLoad %int %arg_3
- %43 = OpConvertSToF %float %44
- %45 = OpCompositeConstruct %v4float %40 %41 %42 %43
- %47 = OpLoad %uint %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %41 = OpLoad %v3float %arg_2
+ %42 = OpCompositeExtract %float %41 0
+ %43 = OpCompositeExtract %float %41 1
+ %44 = OpCompositeExtract %float %41 2
+ %46 = OpLoad %int %arg_3
+ %45 = OpConvertSToF %float %46
+ %47 = OpCompositeConstruct %v4float %42 %43 %44 %45
+ %49 = OpLoad %uint %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %50
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureSampleLevel_a12142
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_a12142
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %56
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleLevel_a12142
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_a12142
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %62 = OpLabel
- %63 = OpFunctionCall %void %textureSampleLevel_a12142
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleLevel_a12142
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl
index 4b06240..be10276 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_a12142() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
index f562a0d..7b91247 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
index 481da2b..f11a31b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_aab3b9() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
index 481da2b..f11a31b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_aab3b9() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
index 44aa130..2493730 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
index 155f61c..b11e9f1 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 59
+; Bound: 60
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,60 +47,61 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %46 = OpTypeFunction %v4float
+ %47 = OpTypeFunction %v4float
%textureSampleLevel_aab3b9 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %36 = OpLoad %v3float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %39 = OpCompositeExtract %float %36 2
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v4float %37 %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_aab3b9
+%vertex_main_inner = OpFunction %v4float None %47
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_aab3b9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %52 = OpLabel
+ %53 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %53
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureSampleLevel_aab3b9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_aab3b9
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %textureSampleLevel_aab3b9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
index bfc6754..3c0fb7f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_aab3b9() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl
index 7d31330..a55b802 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl
index cabcb90..a9952cd 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_abfcc0() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl
index cabcb90..a9952cd 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_abfcc0() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl
index f94eaea..26e29df 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_abfcc0() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -27,7 +27,7 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_abfcc0() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -45,7 +45,7 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_abfcc0() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl
index 399820b..92c1064 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm
index 46b9eb5..4b754e7 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureSampleLevel_abfcc0 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleLevel_abfcc0
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleLevel_abfcc0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleLevel_abfcc0
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_abfcc0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleLevel_abfcc0
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_abfcc0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl
index 73e7921..3d87e97 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_abfcc0() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl
index 890f04d..e083760 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl
index 94ec7e4..ab9072b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ae5e39() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl
index 94ec7e4..ab9072b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ae5e39() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
int arg_3 = 1;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl
index baee28a..ba65b1f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
int arg_3 = 1;
int arg_4 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm
index 7046031..2fcafc0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 60
+; Bound: 61
; Schema: 0
OpCapability Shader
OpCapability SampledCubeArray
@@ -47,61 +47,62 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %int
+ %35 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %46 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %48 = OpTypeFunction %v4float
%textureSampleLevel_ae5e39 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %int_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %35 = OpLoad %v3float %arg_2
- %36 = OpCompositeExtract %float %35 0
- %37 = OpCompositeExtract %float %35 1
- %38 = OpCompositeExtract %float %35 2
- %40 = OpLoad %int %arg_3
- %39 = OpConvertSToF %float %40
- %41 = OpCompositeConstruct %v4float %36 %37 %38 %39
- %43 = OpLoad %int %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %37 = OpLoad %v3float %arg_2
+ %38 = OpCompositeExtract %float %37 0
+ %39 = OpCompositeExtract %float %37 1
+ %40 = OpCompositeExtract %float %37 2
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v4float %38 %39 %40 %41
+ %45 = OpLoad %int %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %46
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_ae5e39
+%vertex_main_inner = OpFunction %v4float None %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureSampleLevel_ae5e39
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %52
+ %53 = OpLabel
+ %54 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %54
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %void %textureSampleLevel_ae5e39
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_ae5e39
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleLevel_ae5e39
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleLevel_ae5e39
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl
index 64bd88b..b2ae0da 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_ae5e39() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
index e11d71f..ce45b30 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
index 9e0a41a..1b711c4 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ae92a2() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
index 9e0a41a..1b711c4 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ae92a2() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x;
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
index d8dd6ce..4c6aa45 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
index 7d9df9a..29bcc63 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,53 +45,54 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %34 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %39 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %41 = OpTypeFunction %v4float
%textureSampleLevel_ae92a2 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v3float %arg_2
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v3float %arg_2
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureSampleLevel_ae92a2
+%vertex_main_inner = OpFunction %v4float None %41
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureSampleLevel_ae92a2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %46 = OpLabel
+ %47 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %47
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureSampleLevel_ae92a2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_ae92a2
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureSampleLevel_ae92a2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
index b44c095..6e70dbc 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_ae92a2() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl
index 3824a55..6763b94 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1i;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl
index df52dfd..80efd9f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_b7c55c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl
index df52dfd..80efd9f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_b7c55c() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl
index baad622..4fda959 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_b7c55c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_b7c55c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_b7c55c() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl
index a1882e9..4f18a1e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_b7c55c(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
int arg_3 = 1;
float arg_4 = 1.0f;
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm
index d7121f1..d46e0ac 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 61
+; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,62 +46,63 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %27 = OpConstantNull %int
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %int
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %45 = OpConstantNull %v2int
+ %46 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %48 = OpTypeFunction %v4float
+ %49 = OpTypeFunction %v4float
%textureSampleLevel_b7c55c = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_int Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_int Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %int_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %int %arg_3
- %40 = OpConvertSToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %45
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %int %arg_3
+ %41 = OpConvertSToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %46
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %48
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureSampleLevel_b7c55c
+%vertex_main_inner = OpFunction %v4float None %49
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_b7c55c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %53 = OpLabel
- %54 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %54
+ %54 = OpLabel
+ %55 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %55
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %56 = OpLabel
- %57 = OpFunctionCall %void %textureSampleLevel_b7c55c
+ %57 = OpLabel
+ %58 = OpFunctionCall %void %textureSampleLevel_b7c55c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleLevel_b7c55c
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_b7c55c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl
index cfd0309..00db2de 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_b7c55c() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1i;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl
index 9339db5..2b59e72 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl
index e5a4de6..825239f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_c32df7() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl
index e5a4de6..825239f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_c32df7() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl
index 91a2a08..533331f 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleLevel_c32df7() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -27,7 +27,7 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleLevel_c32df7() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -45,7 +45,7 @@
uniform highp samplerCube arg_0_arg_1;
void textureSampleLevel_c32df7() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl
index aed7544..b08aa7d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm
index a5cb38f..12dd55a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureSampleLevel_c32df7 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleLevel_c32df7
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleLevel_c32df7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleLevel_c32df7
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_c32df7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleLevel_c32df7
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_c32df7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl
index 4620939..475f975 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_c32df7() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl
index 9c03fdc..20e1dda 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1.f;
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl
index 812fee1..e8d8bba 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_c6aca6() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl
index 812fee1..e8d8bba 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_c6aca6() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl
index 7784b1e..8b40949 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl
@@ -3,7 +3,7 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_c6aca6() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -27,7 +27,7 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_c6aca6() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
@@ -45,7 +45,7 @@
uniform highp sampler2D arg_0_arg_1;
void textureSampleLevel_c6aca6() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
float arg_3 = 1.0f;
vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl
index 1f0f432..074bcb0 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
float arg_3 = 1.0f;
float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3));
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm
index f0f3069..5e35948 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.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
@@ -45,48 +45,49 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
-%_ptr_Function_v2float = OpTypePointer Function %v2float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %35 = OpTypeFunction %v4float
+ %36 = OpTypeFunction %v4float
%textureSampleLevel_c6aca6 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v2float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v2float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %35
- %37 = OpLabel
- %38 = OpFunctionCall %void %textureSampleLevel_c6aca6
+%vertex_main_inner = OpFunction %v4float None %36
+ %38 = OpLabel
+ %39 = OpFunctionCall %void %textureSampleLevel_c6aca6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %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
%fragment_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %void %textureSampleLevel_c6aca6
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureSampleLevel_c6aca6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %46 = OpLabel
- %47 = OpFunctionCall %void %textureSampleLevel_c6aca6
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_c6aca6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl
index 9fe9c9f..a7f1a9d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_c6aca6() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1.0f;
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
index c4ea22f..d3e1c5b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
index 7b8c192..d226209 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_cdfe0f() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
uint arg_4 = 1u;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
index 7b8c192..d226209 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_cdfe0f() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
uint arg_4 = 1u;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
index a56b58c..b572e16 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_cdfe0f(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
uint arg_4 = 1u;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
index 60850e5..37ea878 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 63
+; Bound: 65
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,64 +46,66 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %33 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %46 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %49 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %49 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleLevel_cdfe0f = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %uint_1
- %31 = OpLoad %14 %arg_1
- %32 = OpLoad %11 %arg_0
- %34 = OpSampledImage %33 %32 %31
- %36 = OpLoad %v2float %arg_2
- %37 = OpCompositeExtract %float %36 0
- %38 = OpCompositeExtract %float %36 1
- %40 = OpLoad %uint %arg_3
- %39 = OpConvertUToF %float %40
- %41 = OpCompositeConstruct %v3float %37 %38 %39
- %43 = OpLoad %uint %arg_4
- %42 = OpConvertSToF %float %43
- %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %46
- %29 = OpCompositeExtract %float %30 0
- OpStore %res %29
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %45 = OpLoad %uint %arg_4
+ %44 = OpConvertSToF %float %45
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %49
+ %31 = OpCompositeExtract %float %32 0
+ OpStore %res %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %49
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_cdfe0f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %55
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %58 = OpLabel
- %59 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_cdfe0f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %61 = OpLabel
- %62 = OpFunctionCall %void %textureSampleLevel_cdfe0f
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleLevel_cdfe0f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
index c835321..9332bbe 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_cdfe0f() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1u;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl
index 288aa58..611aa36 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleLevel(texture: texture_3d<f32>, sampler: sampler, coords: vec3<f32>, level: f32, @const offset: vec3<i32>) -> vec4<f32>
fn textureSampleLevel_dcbecb() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1.f;
- const arg_4 = vec3<i32>();
+ const arg_4 = vec3<i32>(1i);
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl
index 1c3bad7..2da8cf6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_dcbecb() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xxx);
+ float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xxx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl
index 1c3bad7..2da8cf6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_dcbecb() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xxx);
+ float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xxx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl
index 3875ed6..e0c5e7e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_dcbecb() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_dcbecb() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler3D arg_0_arg_1;
void textureSampleLevel_dcbecb() {
- vec3 arg_2 = vec3(0.0f);
+ vec3 arg_2 = vec3(1.0f);
float arg_3 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl
index 9068307..5512f6a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleLevel_dcbecb(texture3d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
float arg_3 = 1.0f;
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int3(0));
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int3(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm
index 59538e7..f3ec385 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.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
@@ -45,51 +45,53 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
-%_ptr_Function_v3float = OpTypePointer Function %v3float
%float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%_ptr_Function_float = OpTypePointer Function %float
- %29 = OpTypeSampledImage %11
+ %30 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %35 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %37 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%textureSampleLevel_dcbecb = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
%arg_3 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %float_1
- %27 = OpLoad %14 %arg_1
- %28 = OpLoad %11 %arg_0
- %30 = OpSampledImage %29 %28 %27
- %31 = OpLoad %v3float %arg_2
- %32 = OpLoad %float %arg_3
- %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod|ConstOffset %32 %35
- OpStore %res %26
+ %28 = OpLoad %14 %arg_1
+ %29 = OpLoad %11 %arg_0
+ %31 = OpSampledImage %30 %29 %28
+ %32 = OpLoad %v3float %arg_2
+ %33 = OpLoad %float %arg_3
+ %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod|ConstOffset %33 %37
+ OpStore %res %27
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureSampleLevel_dcbecb
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureSampleLevel_dcbecb
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %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 %textureSampleLevel_dcbecb
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %textureSampleLevel_dcbecb
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureSampleLevel_dcbecb
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureSampleLevel_dcbecb
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl
index 0169878..0bb9522 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_dcbecb() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1.0f;
- const arg_4 = vec3<i32>();
+ const arg_4 = vec3<i32>(1i);
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl
index 284904f..4aa6650 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl
index 416f7c1..b836f82 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_e6ce9e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
int arg_4 = 1;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl
index 416f7c1..b836f82 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_e6ce9e() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
int arg_4 = 1;
- float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl
index d4cb9c0..222b2c3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_e6ce9e(depth2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
int arg_4 = 1;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm
index 55a16bd..ea6785b 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 66
+; Bound: 67
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,67 +46,68 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %32 = OpConstantNull %int
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %int
+ %39 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%v2int = OpTypeVector %int 2
- %49 = OpConstantNull %v2int
+ %51 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %52 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %54 = OpTypeFunction %v4float
%textureSampleLevel_e6ce9e = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %32
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %int_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %40 = OpLoad %v2float %arg_2
- %41 = OpCompositeExtract %float %40 0
- %42 = OpCompositeExtract %float %40 1
- %44 = OpLoad %uint %arg_3
- %43 = OpConvertUToF %float %44
- %45 = OpCompositeConstruct %v3float %41 %42 %43
- %47 = OpLoad %int %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod|ConstOffset %46 %49
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %42 = OpLoad %v2float %arg_2
+ %43 = OpCompositeExtract %float %42 0
+ %44 = OpCompositeExtract %float %42 1
+ %46 = OpLoad %uint %arg_3
+ %45 = OpConvertUToF %float %46
+ %47 = OpCompositeConstruct %v3float %43 %44 %45
+ %49 = OpLoad %int %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod|ConstOffset %48 %51
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %52
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_e6ce9e
+%vertex_main_inner = OpFunction %v4float None %54
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_e6ce9e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %58
+ %59 = OpLabel
+ %60 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %60
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %61 = OpLabel
- %62 = OpFunctionCall %void %textureSampleLevel_e6ce9e
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureSampleLevel_e6ce9e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %64 = OpLabel
- %65 = OpFunctionCall %void %textureSampleLevel_e6ce9e
+ %65 = OpLabel
+ %66 = OpFunctionCall %void %textureSampleLevel_e6ce9e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl
index c1ddb35..724e8e3 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_e6ce9e() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1i;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
index 438cfbf..3392a3e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl
@@ -25,9 +25,9 @@
// fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, level: u32, @const offset: vec2<i32>) -> f32
fn textureSampleLevel_f3b2c8() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
index 86d0fd6..84069c6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_f3b2c8() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
index 86d0fd6..84069c6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl
@@ -2,9 +2,9 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_f3b2c8() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
- float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x;
+ float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x;
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
index b75e321..c5343b9 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl
@@ -3,9 +3,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_f3b2c8() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
vec4 vertex_main() {
@@ -27,9 +27,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_f3b2c8() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
void fragment_main() {
@@ -45,9 +45,9 @@
uniform highp sampler2DShadow arg_0_arg_1;
void textureSampleLevel_f3b2c8() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
- float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0));
+ float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
index 71b03c8..3be2b49 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureSampleLevel_f3b2c8(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
- float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0));
+ float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
index d36a678..8d13036 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 58
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -45,56 +45,58 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %32 = OpTypeSampledImage %11
+ %29 = OpConstantNull %uint
+ %34 = OpTypeSampledImage %11
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %39 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %42 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_float = OpTypePointer Function %float
- %42 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %45 = OpTypeFunction %v4float
%textureSampleLevel_f3b2c8 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
- %30 = OpLoad %14 %arg_1
- %31 = OpLoad %11 %arg_0
- %33 = OpSampledImage %32 %31 %30
- %34 = OpLoad %v2float %arg_2
- %36 = OpLoad %uint %arg_3
- %35 = OpConvertSToF %float %36
- %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %39
- %28 = OpCompositeExtract %float %29 0
- OpStore %res %28
+ %32 = OpLoad %14 %arg_1
+ %33 = OpLoad %11 %arg_0
+ %35 = OpSampledImage %34 %33 %32
+ %36 = OpLoad %v2float %arg_2
+ %38 = OpLoad %uint %arg_3
+ %37 = OpConvertSToF %float %38
+ %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod|ConstOffset %37 %42
+ %30 = OpCompositeExtract %float %31 0
+ OpStore %res %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %42
- %44 = OpLabel
- %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+%vertex_main_inner = OpFunction %v4float None %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %47 = OpLabel
- %48 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %48
+ %50 = OpLabel
+ %51 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %51
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureSampleLevel_f3b2c8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %void %textureSampleLevel_f3b2c8
+ %56 = OpLabel
+ %57 = OpFunctionCall %void %textureSampleLevel_f3b2c8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
index 7f7484a..b8c2a96 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl
@@ -3,9 +3,9 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_f3b2c8() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
- const arg_4 = vec2<i32>();
+ const arg_4 = vec2<i32>(1i);
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
index 4589577..711b6a6 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl
@@ -25,10 +25,10 @@
// 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 arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1.f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res: vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
index 9aa6734..f6a9777 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_faa6d7() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
index 9aa6734..f6a9777 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl
@@ -2,10 +2,10 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_faa6d7() {
- float2 arg_2 = (0.0f).xx;
+ float2 arg_2 = (1.0f).xx;
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx);
+ float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx);
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
index 28b00f3..cf4331e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl
@@ -3,10 +3,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_faa6d7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
vec4 vertex_main() {
@@ -28,10 +28,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_faa6d7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void fragment_main() {
@@ -47,10 +47,10 @@
uniform highp sampler2DArray arg_0_arg_1;
void textureSampleLevel_faa6d7() {
- vec2 arg_2 = vec2(0.0f);
+ vec2 arg_2 = vec2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0));
+ vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1));
}
void compute_main() {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
index 04351fe..04ccb6e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl
@@ -2,10 +2,10 @@
using namespace metal;
void textureSampleLevel_faa6d7(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
- float2 arg_2 = float2(0.0f);
+ float2 arg_2 = float2(1.0f);
uint arg_3 = 1u;
float arg_4 = 1.0f;
- float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0));
+ float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1));
}
struct tint_symbol {
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
index 4329382..c43e66d 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 62
+; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -46,63 +46,65 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v2float = OpTypeVector %float 2
- %20 = OpConstantNull %v2float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_v2float = OpTypePointer Function %v2float
+ %24 = OpConstantNull %v2float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
- %float_1 = OpConstant %float 1
+ %29 = OpConstantNull %uint
%_ptr_Function_float = OpTypePointer Function %float
- %34 = OpTypeSampledImage %11
+ %35 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %46 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %48 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
- %49 = OpTypeFunction %v4float
+ %51 = OpTypeFunction %v4float
%textureSampleLevel_faa6d7 = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v2float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
+ %arg_2 = OpVariable %_ptr_Function_v2float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
%arg_4 = OpVariable %_ptr_Function_float Function %8
%res = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %float_1
- %32 = OpLoad %14 %arg_1
- %33 = OpLoad %11 %arg_0
- %35 = OpSampledImage %34 %33 %32
- %37 = OpLoad %v2float %arg_2
- %38 = OpCompositeExtract %float %37 0
- %39 = OpCompositeExtract %float %37 1
- %41 = OpLoad %uint %arg_3
- %40 = OpConvertUToF %float %41
- %42 = OpCompositeConstruct %v3float %38 %39 %40
- %43 = OpLoad %float %arg_4
- %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %46
- OpStore %res %31
+ %33 = OpLoad %14 %arg_1
+ %34 = OpLoad %11 %arg_0
+ %36 = OpSampledImage %35 %34 %33
+ %38 = OpLoad %v2float %arg_2
+ %39 = OpCompositeExtract %float %38 0
+ %40 = OpCompositeExtract %float %38 1
+ %42 = OpLoad %uint %arg_3
+ %41 = OpConvertUToF %float %42
+ %43 = OpCompositeConstruct %v3float %39 %40 %41
+ %44 = OpLoad %float %arg_4
+ %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %48
+ OpStore %res %32
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %49
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureSampleLevel_faa6d7
+%vertex_main_inner = OpFunction %v4float None %51
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureSampleLevel_faa6d7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %54 = OpLabel
- %55 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %55
+ %56 = OpLabel
+ %57 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %57
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %57 = OpLabel
- %58 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %textureSampleLevel_faa6d7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %60 = OpLabel
- %61 = OpFunctionCall %void %textureSampleLevel_faa6d7
+ %62 = OpLabel
+ %63 = OpFunctionCall %void %textureSampleLevel_faa6d7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
index b9a723f..aa0a6a9 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl
@@ -3,10 +3,10 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_faa6d7() {
- var arg_2 = vec2<f32>();
+ var arg_2 = vec2<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1.0f;
- const arg_5 = vec2<i32>();
+ const arg_5 = vec2<i32>(1i);
var res : vec4<f32> = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
}
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl
index 013b132..4b45581 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl
+++ b/test/tint/builtins/gen/var/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 arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.f);
var arg_3 = 1u;
var arg_4 = 1i;
var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl
index fc2da63..a185c7e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ff11bc() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl
index fc2da63..a185c7e 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
SamplerState arg_1 : register(s1, space1);
void textureSampleLevel_ff11bc() {
- float3 arg_2 = (0.0f).xxx;
+ float3 arg_2 = (1.0f).xxx;
uint arg_3 = 1u;
int arg_4 = 1;
float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x;
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl
index a6166a0..a6909d5 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/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) {
- float3 arg_2 = float3(0.0f);
+ float3 arg_2 = float3(1.0f);
uint arg_3 = 1u;
int arg_4 = 1;
float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4));
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm
index 65b80ac..ce0b555 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.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 SampledCubeArray
@@ -47,65 +47,66 @@
%void = OpTypeVoid
%15 = OpTypeFunction %void
%v3float = OpTypeVector %float 3
- %20 = OpConstantNull %v3float
+ %float_1 = OpConstant %float 1
+ %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
+ %24 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %27 = OpConstantNull %uint
+ %29 = OpConstantNull %uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %32 = OpConstantNull %int
- %37 = OpTypeSampledImage %11
+ %34 = OpConstantNull %int
+ %39 = OpTypeSampledImage %11
%_ptr_Function_float = OpTypePointer Function %float
- %50 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %52 = OpTypeFunction %v4float
%textureSampleLevel_ff11bc = OpFunction %void None %15
%18 = OpLabel
- %arg_2 = OpVariable %_ptr_Function_v3float Function %20
- %arg_3 = OpVariable %_ptr_Function_uint Function %27
- %arg_4 = OpVariable %_ptr_Function_int Function %32
+ %arg_2 = OpVariable %_ptr_Function_v3float Function %24
+ %arg_3 = OpVariable %_ptr_Function_uint Function %29
+ %arg_4 = OpVariable %_ptr_Function_int Function %34
%res = OpVariable %_ptr_Function_float Function %8
- OpStore %arg_2 %20
+ OpStore %arg_2 %21
OpStore %arg_3 %uint_1
OpStore %arg_4 %int_1
- %35 = OpLoad %14 %arg_1
- %36 = OpLoad %11 %arg_0
- %38 = OpSampledImage %37 %36 %35
- %39 = OpLoad %v3float %arg_2
- %40 = OpCompositeExtract %float %39 0
- %41 = OpCompositeExtract %float %39 1
- %42 = OpCompositeExtract %float %39 2
- %44 = OpLoad %uint %arg_3
- %43 = OpConvertUToF %float %44
- %45 = OpCompositeConstruct %v4float %40 %41 %42 %43
- %47 = OpLoad %int %arg_4
- %46 = OpConvertSToF %float %47
- %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46
- %33 = OpCompositeExtract %float %34 0
- OpStore %res %33
+ %37 = OpLoad %14 %arg_1
+ %38 = OpLoad %11 %arg_0
+ %40 = OpSampledImage %39 %38 %37
+ %41 = OpLoad %v3float %arg_2
+ %42 = OpCompositeExtract %float %41 0
+ %43 = OpCompositeExtract %float %41 1
+ %44 = OpCompositeExtract %float %41 2
+ %46 = OpLoad %uint %arg_3
+ %45 = OpConvertUToF %float %46
+ %47 = OpCompositeConstruct %v4float %42 %43 %44 %45
+ %49 = OpLoad %int %arg_4
+ %48 = OpConvertSToF %float %49
+ %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48
+ %35 = OpCompositeExtract %float %36 0
+ OpStore %res %35
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %50
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureSampleLevel_ff11bc
+%vertex_main_inner = OpFunction %v4float None %52
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureSampleLevel_ff11bc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %15
- %55 = OpLabel
- %56 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %56
+ %57 = OpLabel
+ %58 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %58
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %15
- %59 = OpLabel
- %60 = OpFunctionCall %void %textureSampleLevel_ff11bc
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %textureSampleLevel_ff11bc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
- %62 = OpLabel
- %63 = OpFunctionCall %void %textureSampleLevel_ff11bc
+ %63 = OpLabel
+ %64 = OpFunctionCall %void %textureSampleLevel_ff11bc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl
index 31ed6fe..3f0462a 100644
--- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl
@@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler;
fn textureSampleLevel_ff11bc() {
- var arg_2 = vec3<f32>();
+ var arg_2 = vec3<f32>(1.0f);
var arg_3 = 1u;
var arg_4 = 1i;
var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4);
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl
index 8c8d6c6..7cd1264 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
fn textureStore_00ca64() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl
index bc0aef6..28af169 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_00ca64() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl
index bc0aef6..28af169 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_00ca64() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl
index 2d80cee..7f9cf0d 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_00ca64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_00ca64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_00ca64() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl
index eb9a573..f99ba1f 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_00ca64(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm
index 4469ec0..5c08814 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_00ca64 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_00ca64
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_00ca64
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_00ca64
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_00ca64
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_00ca64
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_00ca64
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl
index a9d8fc4..9672254 100644
--- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
fn textureStore_00ca64() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl
index 8ca7f68..64ec2f8 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
fn textureStore_0148bd() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl
index 05d3e35..dcf713b 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_0148bd() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl
index 05d3e35..dcf713b 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_0148bd() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl
index c028f23..54ea295 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0148bd() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0148bd() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0148bd() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl
index 0426dc0..c813cb2 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_0148bd(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm
index 2d64adc..046daad 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_0148bd = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_0148bd
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_0148bd
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_0148bd
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_0148bd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_0148bd
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_0148bd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl
index 80f6c27..3da6033 100644
--- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
fn textureStore_0148bd() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl
index 9195e69..ec9d7a9 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_05ce15() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl
index c83a95c..0c19880 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_05ce15() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl
index c83a95c..0c19880 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_05ce15() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl
index 5437eda..e40a987 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_05ce15() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_05ce15() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_05ce15() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl
index 9eb8590..10e16a5 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_05ce15(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm
index 8120c43..e5dc004 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_05ce15 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_05ce15
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_05ce15
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 %textureStore_05ce15
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_05ce15
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_05ce15
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_05ce15
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl
index 85050b5..6110878 100644
--- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
fn textureStore_05ce15() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl
index d1ee996..31d8bf5 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_064c7f() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl
index 8adf145..711e1c7 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_064c7f() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl
index 8adf145..711e1c7 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_064c7f() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl
index 00a4cf7..2efa3e3 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_064c7f(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm
index d6d60c0..e81ac09 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.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
OpCapability StorageImageExtendedFormats
@@ -41,42 +41,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_064c7f = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_064c7f
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_064c7f
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 %textureStore_064c7f
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_064c7f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_064c7f
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_064c7f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl
index ba056bc..853f005 100644
--- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
fn textureStore_064c7f() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl
index 32f39e3..e1e22c9 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba16uint, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureStore_068641() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl
index 092e801..9823316 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_068641() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl
index 092e801..9823316 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_068641() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl
index f84a5f2..d627f3c 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
void textureStore_068641() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
void textureStore_068641() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
void textureStore_068641() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl
index a35ed83..0c0aa54 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_068641(texture3d<uint, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- uint4 arg_2 = uint4(0u);
+ int3 arg_1 = int3(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm
index b77d315..5c3f360 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_068641 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_068641
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_068641
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_068641
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_068641
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_068641
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_068641
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl
index bad48dd..6e49bfc 100644
--- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, write>;
fn textureStore_068641() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl
index dcc3c36..2a75d72 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_06e49c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl
index 632d664..120661e 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_06e49c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl
index 632d664..120661e 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_06e49c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl
index 8e3732f..265a868 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_06e49c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_06e49c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_06e49c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl
index a2beb54..9c379af 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_06e49c(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm
index 2db7642..2460f5e 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_06e49c = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_06e49c
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_06e49c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_06e49c
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_06e49c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_06e49c
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_06e49c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl
index 0373258..9e0a36f 100644
--- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
fn textureStore_06e49c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
index 2a43425..7ddcb61 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<u32>, value: vec4<i32>)
fn textureStore_07548b() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
index 56dfb6c..f33e906 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_07548b() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
index 56dfb6c..f33e906 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_07548b() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
index 26da7f2..c1b94f0 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_07548b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_07548b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_07548b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
index 05af3ae..179f9868 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_07548b(texture3d<int, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- int4 arg_2 = int4(0);
+ uint3 arg_1 = uint3(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
index 02f5ee8..2a78c9c 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_07548b = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_07548b
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_07548b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_07548b
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_07548b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_07548b
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_07548b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
index c935ddc..1938ab6 100644
--- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
fn textureStore_07548b() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl
index 90e3619..9a69d14 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
fn textureStore_0a1a79() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl
index 62d0c96..d52e0c7 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_0a1a79() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl
index 62d0c96..d52e0c7 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_0a1a79() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl
index 931033d..b955a02 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_0a1a79() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_0a1a79() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_0a1a79() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl
index 8d201f2..532d8c8 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_0a1a79(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm
index 417481a..cedd43d 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_0a1a79 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_0a1a79
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_0a1a79
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_0a1a79
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_0a1a79
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_0a1a79
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_0a1a79
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl
index 9c8a216..61f1fe9 100644
--- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
fn textureStore_0a1a79() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl
index 8814567..eb144e5 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_0af6b5() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl
index a0e877b..5484237 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_0af6b5() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl
index a0e877b..5484237 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_0af6b5() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl
index 1ae6b6b..7d26a29 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_0af6b5() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_0af6b5() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_0af6b5() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl
index cbf3101..de6f241 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_0af6b5(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm
index 2c11b9d..dbf15f2 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_0af6b5 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_0af6b5
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_0af6b5
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 %textureStore_0af6b5
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_0af6b5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_0af6b5
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_0af6b5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl
index cba9b02..a0000ef 100644
--- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
fn textureStore_0af6b5() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl
index 09d1595..655177a 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<i32>, value: vec4<u32>)
fn textureStore_0c3dff() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl
index 2c960ef..5fe4eaf 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_0c3dff() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl
index 2c960ef..5fe4eaf 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_0c3dff() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl
index 216ba1a..f7b6498 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_0c3dff() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_0c3dff() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_0c3dff() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl
index 7778f10..d33b405 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_0c3dff(texture2d<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- uint4 arg_2 = uint4(0u);
+ int2 arg_1 = int2(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm
index a5e6876..fc42068 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_0c3dff = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_0c3dff
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_0c3dff
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_0c3dff
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_0c3dff
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_0c3dff
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_0c3dff
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl
index 3da20f2..4f16e0d 100644
--- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
fn textureStore_0c3dff() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl
index 1c34d7f..94cff34 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
fn textureStore_0cc825() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl
index d0d43f7..9528144 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_0cc825() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl
index d0d43f7..9528144 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_0cc825() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl
index 5b99527..08388eb 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0cc825() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0cc825() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_0cc825() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl
index 64aa5a9..5ef5511 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_0cc825(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm
index 93080b6..e817aeb 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_0cc825 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_0cc825
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_0cc825
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_0cc825
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_0cc825
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_0cc825
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_0cc825
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl
index b5dce9d..7073dc0 100644
--- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
fn textureStore_0cc825() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl
index 953b39a..6a983d5 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: i32, value: vec4<u32>)
fn textureStore_102722() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl
index e256ac8..4c4b092 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_102722() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl
index e256ac8..4c4b092 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_102722() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl
index f197dcc..50ee1c6 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_102722(texture1d<uint, access::write> tint_symbol_1) {
int arg_1 = 1;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm
index 0311196..243634e 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_102722 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %21
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
OpStore %arg_1 %int_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %int %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_102722
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_102722
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_102722
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_102722
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_102722
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_102722
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl
index ca67293..34b69c3 100644
--- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_102722() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
index 9e357ca..36d1073 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
fn textureStore_158cf0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
index c2d4244..dba67c8 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_158cf0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
index c2d4244..dba67c8 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_158cf0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
index 3fbe7e3..fd42714 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_158cf0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_158cf0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_158cf0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
index b53dec4..e5a7cc7 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_158cf0(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
index 540fcce..2316c2d 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %26 = OpConstantNull %v4uint
+ %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %30 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_158cf0 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2uint %arg_1
- %33 = OpCompositeExtract %uint %32 0
- %34 = OpCompositeExtract %uint %32 1
- %35 = OpLoad %uint %arg_2
- %36 = OpCompositeConstruct %v3uint %33 %34 %35
- %37 = OpLoad %v4uint %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %v4uint %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_158cf0
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_158cf0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_158cf0
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_158cf0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_158cf0
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_158cf0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
index 234e5ce..cf77fa8 100644
--- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
fn textureStore_158cf0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
index 58f1750..d7fda87 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<u32>, value: vec4<i32>)
fn textureStore_1839f2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
index a349cc7..c7d1d01 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_1839f2() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
index a349cc7..c7d1d01 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_1839f2() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
index 290798d..80d857b 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_1839f2() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_1839f2() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_1839f2() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
index 2ab9268..dfe79c1 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_1839f2(texture2d<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- int4 arg_2 = int4(0);
+ uint2 arg_1 = uint2(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
index 9ceec9b..801a5de 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_1839f2 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_1839f2
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_1839f2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_1839f2
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_1839f2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_1839f2
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_1839f2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
index 8dbc1c9..53634ab 100644
--- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
fn textureStore_1839f2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
index 88a097b..544693a 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
fn textureStore_1a7d35() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
index 0a928d2..7fc2cd7 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1a7d35() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
index 0a928d2..7fc2cd7 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1a7d35() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
index 3e00907..bcd8839 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1a7d35() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1a7d35() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1a7d35() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
index e5c4cd4..edf7dc3 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_1a7d35(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
index 72a691f..c73f137 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_1a7d35 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %v4int %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %39 = OpLoad %uint %arg_2
+ %40 = OpCompositeConstruct %v3uint %37 %38 %39
+ %41 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_1a7d35
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_1a7d35
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_1a7d35
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_1a7d35
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_1a7d35
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_1a7d35
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
index 81eb9a1..d20a4b0 100644
--- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
fn textureStore_1a7d35() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl
index 4445c3d..5fd9db6 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_1bbd08() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl
index 9bbd9cf..ce81287 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_1bbd08() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl
index 9bbd9cf..ce81287 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_1bbd08() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl
index 8bbedc5..ebbd4b4 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_1bbd08() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_1bbd08() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_1bbd08() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl
index a09fc63..25ebb70 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_1bbd08(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm
index e5356af..c67fbe5 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_1bbd08 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_1bbd08
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_1bbd08
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 %textureStore_1bbd08
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_1bbd08
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_1bbd08
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_1bbd08
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl
index 7043ee1..0f2939e 100644
--- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
fn textureStore_1bbd08() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl
index 383b4f0..b7226e4 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
fn textureStore_1c02e7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl
index 4fe7a79..722133e 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1c02e7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl
index 4fe7a79..722133e 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1c02e7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl
index 43e87d1..20a007a 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1c02e7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1c02e7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1c02e7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl
index a2ef827..2d3b1a9 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_1c02e7(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm
index 8497c20..e73c661 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %26 = OpConstantNull %v4int
+ %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_1c02e7 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_v4int Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2int %arg_1
- %33 = OpCompositeExtract %int %32 0
- %34 = OpCompositeExtract %int %32 1
- %35 = OpLoad %int %arg_2
- %36 = OpCompositeConstruct %v3int %33 %34 %35
- %37 = OpLoad %v4int %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %v4int %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_1c02e7
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_1c02e7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_1c02e7
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_1c02e7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_1c02e7
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_1c02e7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl
index 1632c65..68cd402 100644
--- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
fn textureStore_1c02e7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
index 252b14a..fbfcdb4 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: u32, value: vec4<i32>)
fn textureStore_1dc954() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
index 63191df..5b510fb 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_1dc954() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
index 63191df..5b510fb 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_1dc954() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
index 78aa861..7263621 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_1dc954(texture1d<int, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
index 2d08c73..d5eb6a3 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_1dc954 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %21
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
OpStore %arg_1 %uint_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %uint %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_1dc954
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_1dc954
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_1dc954
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_1dc954
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_1dc954
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_1dc954
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
index 498cfc4..7030e86 100644
--- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_1dc954() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
index cb704a8..16e0779 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32float, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_1e20f2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
index d7b4a2b..6100385 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_1e20f2() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
index d7b4a2b..6100385 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_1e20f2() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
index 1ea1aaf..2f54945 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_1e20f2() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_1e20f2() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(r32f) uniform highp writeonly image2D arg_0;
void textureStore_1e20f2() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
index 698070e..de3d80e 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_1e20f2(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
index db47768..5f435d0 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_1e20f2 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_1e20f2
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_1e20f2
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 %textureStore_1e20f2
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_1e20f2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_1e20f2
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_1e20f2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
index 1116037..966a957 100644
--- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
fn textureStore_1e20f2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl
index 11f4582..3992003 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
fn textureStore_1f1ef8() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
index ffa0ed2..35af475 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1f1ef8() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
index ffa0ed2..35af475 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_1f1ef8() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl
index 81f7833..e04a7f1 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1f1ef8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1f1ef8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_1f1ef8() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl
index d7023a4..1b49bdf 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_1f1ef8(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm
index 2f0bad3..d604a9a 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_1f1ef8 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_1f1ef8
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_1f1ef8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_1f1ef8
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_1f1ef8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_1f1ef8
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_1f1ef8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl
index 5a4ba99..8c4b8d0 100644
--- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
fn textureStore_1f1ef8() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
index c00156f..0c9fc1f 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_207fdd() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
index 9e5acc4..3756cec 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_207fdd() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
index 9e5acc4..3756cec 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_207fdd() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
index be45a70..fd81cb6 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_207fdd() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_207fdd() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_207fdd() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
index 97a7ca9..396bd7c 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_207fdd(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
index b40adc5..4ac25eb0 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_207fdd = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_207fdd
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_207fdd
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 %textureStore_207fdd
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_207fdd
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_207fdd
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_207fdd
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
index 703e7ce..52d756f 100644
--- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
fn textureStore_207fdd() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl
index ab56eff..741a0d9 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
fn textureStore_22d955() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl
index ac28249..1c5aefe 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_22d955() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl
index ac28249..1c5aefe 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_22d955() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl
index d8279c2..2e6e6d4 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_22d955() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_22d955() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_22d955() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl
index be88306..d83ba28 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_22d955(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm
index dff6bf1..80c0363 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_22d955 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %39 = OpLoad %int %arg_2
+ %40 = OpCompositeConstruct %v3int %37 %38 %39
+ %41 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_22d955
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_22d955
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_22d955
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_22d955
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_22d955
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_22d955
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl
index 9ca9d8e..2bdc27e 100644
--- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
fn textureStore_22d955() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl
index 6e2e0a5..6ad75f8 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_22f045() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl
index 9f081c3..915ae9e 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_22f045() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl
index 9f081c3..915ae9e 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_22f045() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl
index d57b75b..0788b23 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_22f045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_22f045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_22f045() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl
index 0195bd5..8ebc61f 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_22f045(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm
index 164d082..c0333ad 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/22f045.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_22f045 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_22f045
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_22f045
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_22f045
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_22f045
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_22f045
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_22f045
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl
index 28b7b5b..10e82ad 100644
--- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
fn textureStore_22f045() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl
index a6845ca..7a8c885 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
fn textureStore_2383fc() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl
index ea89155..46d7d3d 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_2383fc() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl
index ea89155..46d7d3d 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_2383fc() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl
index 73f19f9..c298527 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_2383fc() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_2383fc() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_2383fc() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl
index f343b91..0e54c94 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_2383fc(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm
index b31de19..6d925bf 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_2383fc = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_2383fc
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_2383fc
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_2383fc
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_2383fc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_2383fc
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_2383fc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl
index a8fb10c..c9e1dd2 100644
--- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
fn textureStore_2383fc() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl
index 651efea..008b5c9 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_258ab0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl
index 81ca1b1..7047e7c 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_258ab0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl
index 81ca1b1..7047e7c 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_258ab0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl
index 63b7d96..d0c070f 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_258ab0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_258ab0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_258ab0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl
index e471f48..0c3513a 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_258ab0(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm
index 21ec492..bcf4eb5 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_258ab0 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_258ab0
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_258ab0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_258ab0
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_258ab0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_258ab0
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_258ab0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl
index 17cc765..caf28b2 100644
--- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
fn textureStore_258ab0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl
index 137e2cd..224f16a 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<i32>, value: vec4<u32>)
fn textureStore_26bf70() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl
index 57341d9..c7747ff 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_26bf70() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl
index 57341d9..c7747ff 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_26bf70() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl
index 048b5b4..e4bbc30 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_26bf70() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_26bf70() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_26bf70() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl
index 73242ad..c86dfd5 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_26bf70(texture2d<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- uint4 arg_2 = uint4(0u);
+ int2 arg_1 = int2(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm
index 188aded..94290df 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_26bf70 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_26bf70
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_26bf70
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_26bf70
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_26bf70
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_26bf70
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_26bf70
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl
index 9585caf..d83fa4d 100644
--- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
fn textureStore_26bf70() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl
index 39d8497..074f8c3 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<i32>, value: vec4<i32>)
fn textureStore_2796b4() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl
index 63eefce..757e349 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_2796b4() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl
index 63eefce..757e349 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_2796b4() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl
index c2ebcd9..cb47485 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_2796b4(texture3d<int, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- int4 arg_2 = int4(0);
+ int3 arg_1 = int3(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm
index d79adda..e2080b0 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.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
OpCapability StorageImageExtendedFormats
@@ -41,44 +41,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_2796b4 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_2796b4
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_2796b4
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 %textureStore_2796b4
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_2796b4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_2796b4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_2796b4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl
index 00dfc5d..cceb513 100644
--- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
fn textureStore_2796b4() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl
index 98f2ada..2e7da69 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: u32, value: vec4<f32>)
fn textureStore_285218() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
index e6d6c39..fc40d74 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_285218() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
index e6d6c39..fc40d74 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_285218() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
index c0e94ba..f6bf32a 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_285218(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
index 6603867..b36c2a1 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/285218.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_285218 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_285218
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_285218
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_285218
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_285218
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_285218
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_285218
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
index a2e8b60..1685bc2 100644
--- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_285218() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl
index 644c834..889a179 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
fn textureStore_28a7ec() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl
index adc7c02..f46800b 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_28a7ec() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl
index adc7c02..f46800b 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_28a7ec() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl
index f477fb3..9361577 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_28a7ec() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_28a7ec() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_28a7ec() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl
index 55511c1..92ed017 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_28a7ec(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm
index 1ce8ddf..be90010 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_28a7ec = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_28a7ec
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_28a7ec
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_28a7ec
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_28a7ec
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_28a7ec
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_28a7ec
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl
index ab8d410a..bb74805 100644
--- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
fn textureStore_28a7ec() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl
index 1e0f482..1333e72 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: i32, value: vec4<f32>)
fn textureStore_2ac6c7() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl
index 299e980..15517db 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2ac6c7() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl
index 299e980..15517db 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2ac6c7() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl
index da12ebc..37ba8ed 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_2ac6c7(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm
index f15467a..cd316b5 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_2ac6c7 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_2ac6c7
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_2ac6c7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_2ac6c7
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_2ac6c7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_2ac6c7
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_2ac6c7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl
index 7cb7cde..3a9faa7 100644
--- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_2ac6c7() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
index 588630b..08d4370 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_2d2835() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
index b0cc940..5feb22c 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_2d2835() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
index b0cc940..5feb22c 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_2d2835() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
index 30f7ba5..2fe97bd 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_2d2835(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
index ef33f05..f699efe 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,52 +42,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_2d2835 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_2d2835
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_2d2835
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_2d2835
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_2d2835
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_2d2835
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_2d2835
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
index 76e91c0..2e503b1 100644
--- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
fn textureStore_2d2835() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
index 2512a83..ffe422a 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32float, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_2e6102() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
index ae9f5dd..f1a37fb 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_2e6102() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
index ae9f5dd..f1a37fb 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_2e6102() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
index e3185e6..a2efe7d 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_2e6102() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_2e6102() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32f) uniform highp writeonly image2D arg_0;
void textureStore_2e6102() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
index 76221f2..b12fdb9 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_2e6102(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
index e9c074c..d17728d 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_2e6102 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_2e6102
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_2e6102
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 %textureStore_2e6102
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_2e6102
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_2e6102
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_2e6102
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
index 212a545..8b5556a 100644
--- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
fn textureStore_2e6102() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl
index 1501b10..d293c97 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: i32, value: vec4<u32>)
fn textureStore_2eb2a4() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl
index 36b1326..b0c2cc0 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2eb2a4() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl
index 36b1326..b0c2cc0 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2eb2a4() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl
index 07e1c2a..d3bd936 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_2eb2a4(texture1d<uint, access::write> tint_symbol_1) {
int arg_1 = 1;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm
index c00ec81..19d931f 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_2eb2a4 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %21
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
OpStore %arg_1 %int_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %int %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_2eb2a4
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_2eb2a4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_2eb2a4
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_2eb2a4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_2eb2a4
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_2eb2a4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl
index 38b1ccb..7323e1d 100644
--- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_2eb2a4() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl
index fb7b871..f2d8621 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: i32, value: vec4<f32>)
fn textureStore_2ed2a3() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl
index 5d63a7b..c347426 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2ed2a3() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl
index 5d63a7b..c347426 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_2ed2a3() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl
index e3b850b..e4a9643 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_2ed2a3(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm
index c692c2f..e07c68c 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_2ed2a3 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_2ed2a3
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_2ed2a3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_2ed2a3
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_2ed2a3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_2ed2a3
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_2ed2a3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl
index 54b46ea..39e5cc1 100644
--- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_2ed2a3() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl
index 392288f..16db314 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
fn textureStore_30b0b0() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl
index 79d2f71..2440a69 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_30b0b0() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl
index 79d2f71..2440a69 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_30b0b0() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl
index 9fd35ef..87d1edb 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_30b0b0() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_30b0b0() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_30b0b0() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl
index 4b580cd..e2d8c74 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_30b0b0(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm
index 15a126f..e8ee410 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_30b0b0 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_30b0b0
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_30b0b0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_30b0b0
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_30b0b0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_30b0b0
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_30b0b0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl
index 9ee34ee..cc9fc8a 100644
--- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
fn textureStore_30b0b0() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl
index 05bde5f..27b9e30 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<i32>, value: vec4<i32>)
fn textureStore_31745b() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl
index 3386530..4e8b4bb 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_31745b() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl
index 3386530..4e8b4bb 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_31745b() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl
index bde273a..9a436dc 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_31745b(texture2d<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- int4 arg_2 = int4(0);
+ int2 arg_1 = int2(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm
index 016eb27..683bc16 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/31745b.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
OpCapability StorageImageExtendedFormats
@@ -41,44 +41,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_31745b = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_31745b
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_31745b
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 %textureStore_31745b
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_31745b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_31745b
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_31745b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl
index 03ffd0b..edacd7b 100644
--- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
fn textureStore_31745b() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl
index d7354e6..e31b404 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_32f368() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl
index 1c217b2..2562e61 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_32f368() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl
index 1c217b2..2562e61 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_32f368() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl
index b86d5eb..77d4a8b 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_32f368() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_32f368() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_32f368() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl
index 3daf6cb..6f84388 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_32f368(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm
index a154105..2bed16d 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_32f368 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_32f368
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_32f368
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_32f368
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_32f368
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_32f368
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_32f368
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl
index 06eceed..d36096e 100644
--- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
fn textureStore_32f368() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
index b5d2431..f8c0832 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_330b7c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
index a92e0d0..1338528 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_330b7c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
index a92e0d0..1338528 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_330b7c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
index e6ed5cb..d18eddd 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_330b7c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_330b7c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_330b7c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
index eca28c9..fd47878 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_330b7c(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
index fcaad14..ee90256 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_330b7c = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_330b7c
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_330b7c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_330b7c
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_330b7c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_330b7c
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_330b7c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
index 9770e41..dabad78 100644
--- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
fn textureStore_330b7c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl
index 55d78a0..4dfd7ec 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_331aee() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl
index 1070c26..8e1189f 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_331aee() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl
index 1070c26..8e1189f 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_331aee() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl
index 6d0ade0..e2737d6 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_331aee() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_331aee() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_331aee() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl
index 94c0dee..0b7bcaa 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_331aee(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm
index df8cccf..a06250e 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/331aee.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_331aee = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_331aee
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_331aee
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 %textureStore_331aee
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_331aee
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_331aee
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_331aee
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl
index 97cea3b..115bdee 100644
--- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
fn textureStore_331aee() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl
index b713ef0..f075034 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
fn textureStore_33cec0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl
index df6a6f3..ee79489 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_33cec0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl
index df6a6f3..ee79489 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_33cec0() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl
index 63ee534..0e7b456 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_33cec0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_33cec0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_33cec0() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl
index 34013f8..94eda71 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_33cec0(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm
index 9419b08..2fe8ee7 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_33cec0 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_33cec0
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_33cec0
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_33cec0
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_33cec0
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_33cec0
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_33cec0
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl
index 69b0ffd..e1f07b1 100644
--- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
fn textureStore_33cec0() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl
index 4c3130b..b8a7ce1 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_37ffd4() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl
index 96673e8..f5ad13e 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_37ffd4() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl
index 96673e8..f5ad13e 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_37ffd4() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl
index e8eb1a4..66ed916 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_37ffd4() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_37ffd4() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_37ffd4() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl
index 7e89ceb..36e93dc 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_37ffd4(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm
index 8c2ae06..6c02239 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_37ffd4 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_37ffd4
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_37ffd4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_37ffd4
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_37ffd4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_37ffd4
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_37ffd4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl
index a26203a..317fe2c 100644
--- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
fn textureStore_37ffd4() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl
index 37b7f42..97302a4 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
fn textureStore_38e8d7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl
index 6e867ec..317005d 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_38e8d7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl
index 6e867ec..317005d 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_38e8d7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl
index 7a6850e..a2fdcf8 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_38e8d7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_38e8d7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_38e8d7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl
index c22bedb..98b3084 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_38e8d7(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm
index 623d520..0125a43 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_38e8d7 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %39 = OpLoad %int %arg_2
+ %40 = OpCompositeConstruct %v3int %37 %38 %39
+ %41 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_38e8d7
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_38e8d7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_38e8d7
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_38e8d7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_38e8d7
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_38e8d7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl
index 37b07ea..48f79ff 100644
--- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
fn textureStore_38e8d7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl
index 504713e..b492c44 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
fn textureStore_3a52ac() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl
index f682606..a32e018 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_3a52ac() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl
index f682606..a32e018 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_3a52ac() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl
index 4ae9505..d862022 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_3a52ac() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_3a52ac() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_3a52ac() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl
index e243637..65f36a5 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_3a52ac(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm
index ef89e77..1496de0 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %26 = OpConstantNull %v4int
+ %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_3a52ac = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_v4int Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2int %arg_1
- %33 = OpCompositeExtract %int %32 0
- %34 = OpCompositeExtract %int %32 1
- %35 = OpLoad %int %arg_2
- %36 = OpCompositeConstruct %v3int %33 %34 %35
- %37 = OpLoad %v4int %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %v4int %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_3a52ac
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_3a52ac
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_3a52ac
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_3a52ac
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_3a52ac
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_3a52ac
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl
index 8306554..7b6336a 100644
--- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
fn textureStore_3a52ac() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl
index 6301506..906047c 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_3bb7a1() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl
index e18ed4d..46a260c3 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_3bb7a1() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl
index e18ed4d..46a260c3 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_3bb7a1() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl
index a46b20b..ac01732 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_3bb7a1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_3bb7a1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_3bb7a1() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl
index 70c180e..57831d8 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_3bb7a1(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm
index f7e7b38..da8e7d9 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_3bb7a1 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_3bb7a1
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_3bb7a1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_3bb7a1
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_3bb7a1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_3bb7a1
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_3bb7a1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl
index 145dc9a..75a3552 100644
--- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
fn textureStore_3bb7a1() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl
index dd01b7f..47169e7 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: i32, value: vec4<u32>)
fn textureStore_3bec15() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl
index 7092f58..07f9859 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3bec15() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl
index 7092f58..07f9859 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3bec15() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl
index 75e47f1..ae5ae1c 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_3bec15(texture1d<uint, access::write> tint_symbol_1) {
int arg_1 = 1;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm
index 4688a0f..65e8ffe 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_3bec15 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %21
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
OpStore %arg_1 %int_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %int %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_3bec15
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_3bec15
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_3bec15
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_3bec15
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_3bec15
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_3bec15
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl
index af39c20..02803e9 100644
--- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_3bec15() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
index bffb6e2..2d5497a 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8uint, write>, coords: u32, value: vec4<u32>)
fn textureStore_3c1937() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
index 19a9b7b..b1f91c3 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3c1937() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
index 19a9b7b..b1f91c3 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3c1937() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
index 678f483..87b1a47 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_3c1937(texture1d<uint, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
index 421d42f..1633d5f 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_3c1937 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %25
OpStore %arg_1 %uint_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4uint %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_3c1937
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_3c1937
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_3c1937
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_3c1937
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_3c1937
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_3c1937
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
index 568e12c..1bb71e7 100644
--- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_3c1937() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
index dedb10e..edc8ab5 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: u32, value: vec4<i32>)
fn textureStore_3d6f01() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
index 6e3241b..21d5a66 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3d6f01() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
index 6e3241b..21d5a66 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_3d6f01() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
index 1e29e6b..10a8e5d 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_3d6f01(texture1d<int, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
index ea91368..a16a364 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -46,41 +46,43 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_3d6f01 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %21
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
OpStore %arg_1 %uint_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %uint %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_3d6f01
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_3d6f01
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_3d6f01
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_3d6f01
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_3d6f01
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_3d6f01
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
index 693801c..a59f7a1 100644
--- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_3d6f01() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
index 29f4059..dab5410 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_40c455() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
index 5d607d2..e0c5f5c1 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_40c455() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
index 5d607d2..e0c5f5c1 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_40c455() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
index 4ae299e..0b15e40 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_40c455() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_40c455() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_40c455() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
index 477b39a..e724e08 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_40c455(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
index 91daa0a..0ddfe09 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/40c455.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_40c455 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_40c455
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_40c455
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 %textureStore_40c455
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_40c455
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_40c455
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_40c455
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
index 6a50679..0865958 100644
--- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
fn textureStore_40c455() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
index b62f964..9365274 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_4288fc() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
index bb76511..8009fe8 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_4288fc() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
index bb76511..8009fe8 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_4288fc() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
index 0b46698..8b37e2b 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_4288fc() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_4288fc() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_4288fc() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
index 578e1f8..cb21571 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_4288fc(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
index 78e13c6..0bde16b 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_4288fc = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_4288fc
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_4288fc
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 %textureStore_4288fc
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_4288fc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_4288fc
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_4288fc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
index 15e7b21..52e3aeb 100644
--- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
fn textureStore_4288fc() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl
index 5fe3eb2..8b1099f 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba32uint, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureStore_441ba8() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl
index 3af481a..17eb40c 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_441ba8() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl
index 3af481a..17eb40c 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_441ba8() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl
index ef4af51..1350e88 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_441ba8() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_441ba8() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_441ba8() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl
index 1464ab7..2315354 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_441ba8(texture3d<uint, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- uint4 arg_2 = uint4(0u);
+ int3 arg_1 = int3(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm
index b674880..5757914 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_441ba8 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_441ba8
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_441ba8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_441ba8
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_441ba8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_441ba8
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_441ba8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl
index 773999a..319ac4a 100644
--- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, write>;
fn textureStore_441ba8() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl
index c5299a4..23b0f00 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_44daa7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl
index c2793de..fae9131 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_44daa7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl
index c2793de..fae9131 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_44daa7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl
index ea56040..590dc7c 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_44daa7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_44daa7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_44daa7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl
index 3175b4a..b366375 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_44daa7(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm
index 88c6042..7bc33b4 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_44daa7 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_44daa7
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_44daa7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_44daa7
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_44daa7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_44daa7
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_44daa7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl
index 73656cb..c76b503 100644
--- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
fn textureStore_44daa7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl
index c0353f2..34f0cd4 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<u32>, value: vec4<i32>)
fn textureStore_486500() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
index 021c55c..d1703f0 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_486500() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
index 021c55c..d1703f0 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_486500() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
index 5dd0af7..fefc5a5 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_486500() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_486500() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_486500() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
index 0a5e6da..c0a151f 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_486500(texture3d<int, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- int4 arg_2 = int4(0);
+ uint3 arg_1 = uint3(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
index 7b219df..cdc1231 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_486500 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_486500
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_486500
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_486500
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_486500
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_486500
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_486500
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
index 8a03a81..bea8b44 100644
--- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
fn textureStore_486500() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
index 940719b..accfa13 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
fn textureStore_4c454f() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
index 0fcd9a8..113213f 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_4c454f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
index 0fcd9a8..113213f 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_4c454f() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
index 03846dc..6cff1e9 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_4c454f(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
index 39e9b43..593df6e 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -43,54 +43,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_4c454f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %v4int %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %39 = OpLoad %uint %arg_2
+ %40 = OpCompositeConstruct %v3uint %37 %38 %39
+ %41 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_4c454f
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_4c454f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_4c454f
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_4c454f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_4c454f
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_4c454f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
index 59de4ec..29e2d28 100644
--- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
fn textureStore_4c454f() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl
index e17d98f..65547f4c 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
fn textureStore_4d359d() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl
index e10746c..82e2e58 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_4d359d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl
index e10746c..82e2e58 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_4d359d() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl
index 4ac18bc..7f3c1b3 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_4d359d(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm
index 76be202..9db4aeb 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,56 +42,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_4d359d = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_4d359d
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_4d359d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_4d359d
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_4d359d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_4d359d
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_4d359d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl
index 19c62dd..ae6aa59 100644
--- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
fn textureStore_4d359d() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl
index fbe26ee..8a4c152 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_4fc057() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl
index ee4b614..3ad78a4 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_4fc057() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl
index ee4b614..3ad78a4 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_4fc057() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl
index 039e0bb..a61ea79 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_4fc057() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_4fc057() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_4fc057() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl
index c7d5dbb..d3ed57b 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_4fc057(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm
index 710a585..f3cfd34 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_4fc057 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_4fc057
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_4fc057
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_4fc057
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_4fc057
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_4fc057
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_4fc057
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl
index 6cf8c4d..caa193c 100644
--- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
fn textureStore_4fc057() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
index bea26ba..623255e 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<u32>, value: vec4<u32>)
fn textureStore_506a71() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
index f75271e..8f0257d 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_506a71() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
index f75271e..8f0257d 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_506a71() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
index 1e20709..d55f5d8 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_506a71(texture2d<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- uint4 arg_2 = uint4(0u);
+ uint2 arg_1 = uint2(1u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
index 1f5a9ed..ec7574f 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/506a71.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
OpCapability StorageImageExtendedFormats
@@ -41,44 +41,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_506a71 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_506a71
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_506a71
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 %textureStore_506a71
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_506a71
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_506a71
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_506a71
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
index 476f5e7..a8dea61 100644
--- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
fn textureStore_506a71() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
index d2c793f..c9fefcef 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<u32>, value: vec4<i32>)
fn textureStore_52f503() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
index 04d3b35..7093326 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_52f503() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
index 04d3b35..7093326 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_52f503() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
index c606352..d548df8 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_52f503() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_52f503() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_52f503() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
index 7bdcade..210163c 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_52f503(texture2d<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- int4 arg_2 = int4(0);
+ uint2 arg_1 = uint2(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
index 73053df..b5967d5 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_52f503 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_52f503
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_52f503
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_52f503
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_52f503
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_52f503
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_52f503
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
index e313fcc..5fafa0d 100644
--- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
fn textureStore_52f503() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
index 3aaeaa0..eaab31e 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_5841f8() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
index a823f25..eadabe6 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_5841f8() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
index a823f25..eadabe6 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_5841f8() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
index ae1b777..fc888dd 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_5841f8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_5841f8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_5841f8() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
index 7f3b6ae..598bc90 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_5841f8(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
index ad31cfd..c12f982 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_5841f8 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_5841f8
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_5841f8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_5841f8
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_5841f8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_5841f8
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_5841f8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
index 6e57d8d..bd76946 100644
--- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
fn textureStore_5841f8() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl
index bd75214..affb43a 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_59a0ab() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl
index 717254e..88f5a2d 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_59a0ab() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl
index 717254e..88f5a2d 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_59a0ab() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl
index 3cdcbf3..442c0c8 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_59a0ab() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_59a0ab() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_59a0ab() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl
index a22db66..15898bf 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_59a0ab(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm
index 3427873..4e2f6e7 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_59a0ab = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_59a0ab
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_59a0ab
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_59a0ab
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_59a0ab
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_59a0ab
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_59a0ab
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl
index a481390..90e9ec8 100644
--- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
fn textureStore_59a0ab() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl
index 8eba27a..7c83c5a 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: i32, value: vec4<i32>)
fn textureStore_5a2f8f() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl
index f600277..bbcf0cf 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_5a2f8f() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl
index f600277..bbcf0cf 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_5a2f8f() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl
index 7ffe1a4..3368907 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_5a2f8f(texture1d<int, access::write> tint_symbol_1) {
int arg_1 = 1;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm
index 8fd6437..d9aa5fa 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4int
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_5a2f8f = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %25
OpStore %arg_1 %int_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %int %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_5a2f8f
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_5a2f8f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_5a2f8f
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_5a2f8f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_5a2f8f
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_5a2f8f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl
index 444c40b..99ec886 100644
--- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_5a2f8f() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
index 12d19f5..241e4cc 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
fn textureStore_5bc4f3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
index fb3394f..d5e0bc4 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_5bc4f3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
index fb3394f..d5e0bc4 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_5bc4f3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
index 7983b81..f210ad5 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_5bc4f3(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
index 6603a0f..ee825f4 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,54 +42,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %26 = OpConstantNull %v4uint
+ %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %30 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_5bc4f3 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2uint %arg_1
- %33 = OpCompositeExtract %uint %32 0
- %34 = OpCompositeExtract %uint %32 1
- %35 = OpLoad %uint %arg_2
- %36 = OpCompositeConstruct %v3uint %33 %34 %35
- %37 = OpLoad %v4uint %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %v4uint %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_5bc4f3
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_5bc4f3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_5bc4f3
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_5bc4f3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_5bc4f3
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_5bc4f3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
index 1c223d6..e1578ba 100644
--- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
fn textureStore_5bc4f3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl
index 6638789..93a6d15 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
fn textureStore_5ddc61() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl
index 6126253..cac835d 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_5ddc61() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl
index 6126253..cac835d 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_5ddc61() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl
index 49630cf..df933c9 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_5ddc61() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_5ddc61() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_5ddc61() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl
index d02d76e..da2667b 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_5ddc61(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm
index 962f216..e0e9b55 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_5ddc61 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_5ddc61
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_5ddc61
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_5ddc61
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_5ddc61
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_5ddc61
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_5ddc61
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl
index dc049db..cd6c1f4 100644
--- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
fn textureStore_5ddc61() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
index 3cb1f9e..bcc40ed 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8snorm, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_5f9a49() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
index 37a52f0..9f0aa65 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_5f9a49() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
index 37a52f0..9f0aa65 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_5f9a49() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
index 648faf6..be9a922 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_5f9a49() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_5f9a49() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
void textureStore_5f9a49() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
index add811e..22d41be 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_5f9a49(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
index 435a41b..7a17377 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_5f9a49 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_5f9a49
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_5f9a49
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_5f9a49
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_5f9a49
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_5f9a49
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_5f9a49
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
index 951d70c..8bcf205 100644
--- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
fn textureStore_5f9a49() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
index 94aaf8b..ee3842c 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: u32, value: vec4<f32>)
fn textureStore_602b5a() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
index d65e673..11d300d 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_602b5a() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
index d65e673..11d300d 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_602b5a() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
index f5d1847..ffc25e3 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_602b5a(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
index 534c8e1..46c41f9 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.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
OpCapability Image1D
@@ -44,40 +44,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_602b5a = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_602b5a
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_602b5a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_602b5a
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_602b5a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_602b5a
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_602b5a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
index ca22b44..2bd7ed1 100644
--- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_602b5a() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl
index e48ef90..68a1d18 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_60975f() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl
index 15c91c6..5f9b1c9 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_60975f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl
index 15c91c6..5f9b1c9 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_60975f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl
index 0a167a8..9f73ce3 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_60975f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_60975f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_60975f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl
index e70fe51..3882459 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_60975f(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm
index 7807d15..35a3e0d 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_60975f = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_60975f
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_60975f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_60975f
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_60975f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_60975f
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_60975f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl
index bdd52cc..319364f 100644
--- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
fn textureStore_60975f() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl
index eb287ee..88879be 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_658a74() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl
index e611206..dc2f280 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_658a74() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl
index e611206..dc2f280 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_658a74() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl
index d121d3c..a310879 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_658a74(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm
index 52fc52c..ab14481 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/658a74.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
OpCapability StorageImageExtendedFormats
@@ -42,54 +42,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_658a74 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_658a74
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_658a74
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_658a74
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_658a74
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_658a74
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_658a74
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl
index c29799b..d635e16 100644
--- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
fn textureStore_658a74() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl
index 4f6e6df..12fea92 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32uint, write>, coords: vec2<i32>, value: vec4<u32>)
fn textureStore_682fd6() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl
index 613ddb2..972a97e 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_682fd6() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl
index 613ddb2..972a97e 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_682fd6() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl
index 8ef52b0..0d2c30e 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_682fd6(texture2d<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- uint4 arg_2 = uint4(0u);
+ int2 arg_1 = int2(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm
index e7ffff9..d69210f 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,44 +42,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_682fd6 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_682fd6
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_682fd6
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_682fd6
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_682fd6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_682fd6
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_682fd6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl
index a7d1e07..b887646 100644
--- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
fn textureStore_682fd6() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
index 5548e40..89f19ea 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_699a1b() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
index 68a4450..cc8bc8b 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_699a1b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
index 68a4450..cc8bc8b 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_699a1b() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
index b342728..c418a4c 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_699a1b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_699a1b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_699a1b() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
index 57da1da..635d014 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_699a1b(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
index 2c1021a..1b2bab9 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_699a1b = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_699a1b
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_699a1b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_699a1b
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_699a1b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_699a1b
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_699a1b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
index f40f039..e15ec37 100644
--- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
fn textureStore_699a1b() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl
index bed4262..8c49a1a 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32float, write>, coords: i32, value: vec4<f32>)
fn textureStore_6b75c3() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl
index d1842f9..1da026a 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_6b75c3() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl
index d1842f9..1da026a 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_6b75c3() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl
index 525cdb8..4637282 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_6b75c3(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm
index 436599f..a170644 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_6b75c3 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_6b75c3
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_6b75c3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_6b75c3
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_6b75c3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_6b75c3
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_6b75c3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl
index d5492bb..da4a7c7 100644
--- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_6b75c3() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl
index d31db6a..2f19c1d 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: i32, value: vec4<i32>)
fn textureStore_6b80d2() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl
index dc45c99..df5337a 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_6b80d2() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl
index dc45c99..df5337a 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_6b80d2() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl
index 4ec6f6e..872ebc4 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_6b80d2(texture1d<int, access::write> tint_symbol_1) {
int arg_1 = 1;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm
index cc127a7..e068ee9 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4int
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_6b80d2 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %25
OpStore %arg_1 %int_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %int %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_6b80d2
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_6b80d2
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_6b80d2
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_6b80d2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_6b80d2
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_6b80d2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl
index e83366d..6d34e25 100644
--- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_6b80d2() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl
index 21f50ca..6b2ab9a 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<i32>, value: vec4<u32>)
fn textureStore_6cff2e() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl
index 030b9a1..eb1d050 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_6cff2e() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl
index 030b9a1..eb1d050 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_6cff2e() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl
index 31dca28..bd3b42a 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_6cff2e() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_6cff2e() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_6cff2e() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl
index 47ac09a..62842d4 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_6cff2e(texture2d<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- uint4 arg_2 = uint4(0u);
+ int2 arg_1 = int2(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm
index 7907a00..e7c5b80 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_6cff2e = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_6cff2e
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_6cff2e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_6cff2e
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_6cff2e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_6cff2e
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_6cff2e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl
index 37ba249..decce81 100644
--- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
fn textureStore_6cff2e() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl
index 1caeb3e..7260963 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
fn textureStore_6da692() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl
index 2188ce1..3a0b352 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_6da692() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl
index 2188ce1..3a0b352 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_6da692() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl
index c7bc567..8cc9b7c 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6da692() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6da692() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6da692() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl
index 305d2bd..4f4cf30 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_6da692(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm
index 4296871..3dc1804 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_6da692 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %39 = OpLoad %int %arg_2
+ %40 = OpCompositeConstruct %v3int %37 %38 %39
+ %41 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_6da692
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_6da692
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_6da692
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_6da692
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_6da692
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_6da692
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl
index eb4983b..3aef0ec 100644
--- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
fn textureStore_6da692() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl
index 23a8676..b10038e 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: i32, value: vec4<u32>)
fn textureStore_6f8642() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl
index 68d1cee..3c1a7e3 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_6f8642() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl
index 68d1cee..3c1a7e3 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_6f8642() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl
index c44aae7..47c47cc 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6f8642() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6f8642() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_6f8642() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl
index 5b98209..9b423b5 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_6f8642(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm
index cd9d76a..786268a 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_6f8642 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_6f8642
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_6f8642
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_6f8642
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_6f8642
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_6f8642
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_6f8642
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl
index 36630e4..cb9827a 100644
--- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
fn textureStore_6f8642() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl
index 7feec83..c758e8d 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32float, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_726472() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
index 7730353..d825a22 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_726472() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
index 7730353..d825a22 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_726472() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
index 5f2f55c..a4358df 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_726472(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
index 6670ea4..f981dac 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/726472.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
OpCapability StorageImageExtendedFormats
@@ -41,42 +41,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_726472 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_726472
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_726472
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 %textureStore_726472
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_726472
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_726472
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_726472
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
index b0866a3..1712bd8 100644
--- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
fn textureStore_726472() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl
index 08b9a1f..a7805f3 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
fn textureStore_72fa64() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl
index 8de0613..1dbffbb 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_72fa64() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl
index 8de0613..1dbffbb 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_72fa64() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl
index 501db77..7dc7a4d 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_72fa64(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm
index 2f14a12..f1980f3 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -43,55 +43,58 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_72fa64 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_72fa64
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_72fa64
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_72fa64
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_72fa64
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_72fa64
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_72fa64
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl
index 0e90aab..a68ac82 100644
--- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
fn textureStore_72fa64() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl
index c28f3a2..2063ea5 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_731349() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl
index 9647546..41c6295 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_731349() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl
index 9647546..41c6295 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_731349() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl
index 2fc13d7..7873e23 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_731349() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_731349() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_731349() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl
index f7898d7..4c20f23 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_731349(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm
index 0d4982f..d804641 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/731349.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_731349 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_731349
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_731349
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 %textureStore_731349
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_731349
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_731349
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_731349
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl
index eb1aa14..8269e63 100644
--- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
fn textureStore_731349() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
index caabbdb..95ca71c 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8unorm, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_73bbbc() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
index 689ab29..df29991 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_73bbbc() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
index 689ab29..df29991 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_73bbbc() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
index 59505cb..f100d49 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_73bbbc() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_73bbbc() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8) uniform highp writeonly image2D arg_0;
void textureStore_73bbbc() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
index 941e50f..df9a954 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_73bbbc(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
index 8b04462..d968e79 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_73bbbc = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_73bbbc
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_73bbbc
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 %textureStore_73bbbc
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_73bbbc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_73bbbc
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_73bbbc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
index 7728131..a8c6754 100644
--- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
fn textureStore_73bbbc() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl
index e085cce..80276c2 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32sint, write>, coords: vec2<i32>, value: vec4<i32>)
fn textureStore_752da6() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl
index 74afe66..897f76c 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_752da6() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl
index 74afe66..897f76c 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_752da6() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl
index 4c49f79..1d02b54 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_752da6() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_752da6() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32i) uniform highp writeonly iimage2D arg_0;
void textureStore_752da6() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl
index 14805dc..34cacd9 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_752da6(texture2d<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- int4 arg_2 = int4(0);
+ int2 arg_1 = int2(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm
index 4b831a2..670bde4 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/752da6.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_752da6 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_752da6
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_752da6
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 %textureStore_752da6
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_752da6
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_752da6
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_752da6
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl
index 5ec1d8d..7f42960 100644
--- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
fn textureStore_752da6() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
index 1850240..66154bc 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
fn textureStore_779d14() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
index 1d92629..d8cc420 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_779d14() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
index 1d92629..d8cc420 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_779d14() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
index 3ad1db2..3bd1e15 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_779d14() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_779d14() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_779d14() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
index 0d04ed0..cb582aa 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_779d14(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
index f61b543..d686881 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %26 = OpConstantNull %v4uint
+ %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %30 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_779d14 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2uint %arg_1
- %33 = OpCompositeExtract %uint %32 0
- %34 = OpCompositeExtract %uint %32 1
- %35 = OpLoad %uint %arg_2
- %36 = OpCompositeConstruct %v3uint %33 %34 %35
- %37 = OpLoad %v4uint %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %v4uint %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_779d14
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_779d14
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_779d14
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_779d14
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_779d14
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_779d14
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
index 543447b..0af83b5 100644
--- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
fn textureStore_779d14() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl
index 052401c..add7ba4 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<i32>, value: vec4<u32>)
fn textureStore_77c0ae() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl
index 04dafb0..f6f06f7 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_77c0ae() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl
index 04dafb0..f6f06f7 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_77c0ae() {
- int2 arg_1 = (0).xx;
- uint4 arg_2 = (0u).xxxx;
+ int2 arg_1 = (1).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl
index ebdb907..1b74a4e 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_77c0ae() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_77c0ae() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_77c0ae() {
- ivec2 arg_1 = ivec2(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec2 arg_1 = ivec2(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl
index d7d8457..35bc870 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_77c0ae(texture2d<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- uint4 arg_2 = uint4(0u);
+ int2 arg_1 = int2(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm
index 6bacd0e..53da4ac 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_77c0ae = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_77c0ae
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_77c0ae
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_77c0ae
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_77c0ae
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_77c0ae
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_77c0ae
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl
index 28994fc..2bcbf7b 100644
--- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
fn textureStore_77c0ae() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl
index c9fe455..3588d57 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
fn textureStore_7bb211() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl
index 0074f0f..957b02a 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_7bb211() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl
index 0074f0f..957b02a 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_7bb211() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl
index 6d2729b..6941c58 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_7bb211(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm
index cb6aa19..afea97a 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,56 +42,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_7bb211 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_7bb211
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_7bb211
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_7bb211
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_7bb211
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_7bb211
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_7bb211
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl
index 990b9c1..27b0ce8 100644
--- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
fn textureStore_7bb211() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl
index 270a825..c51618c 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
fn textureStore_7cec8d() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl
index d31432b..a90a31f 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_7cec8d() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl
index d31432b..a90a31f 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_7cec8d() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl
index 05b54d9..5d8dfd7 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_7cec8d() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_7cec8d() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_7cec8d() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl
index bc68202..450a31a 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_7cec8d(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm
index b36ee5f..83c7715 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %26 = OpConstantNull %v4int
+ %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_7cec8d = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_v4int Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2int %arg_1
- %33 = OpCompositeExtract %int %32 0
- %34 = OpCompositeExtract %int %32 1
- %35 = OpLoad %int %arg_2
- %36 = OpCompositeConstruct %v3int %33 %34 %35
- %37 = OpLoad %v4int %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %v4int %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_7cec8d
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_7cec8d
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_7cec8d
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_7cec8d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_7cec8d
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_7cec8d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl
index 38fb600..77a6f71 100644
--- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
fn textureStore_7cec8d() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
index b64eb22..1728981 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<u32>, value: vec4<f32>)
fn textureStore_7cf6e7() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
index 516eb54..5ba45d9 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_7cf6e7() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
index 516eb54..5ba45d9 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_7cf6e7() {
- uint2 arg_1 = (0u).xx;
- float4 arg_2 = (0.0f).xxxx;
+ uint2 arg_1 = (1u).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
index dc0045b..7abe534 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_7cf6e7() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_7cf6e7() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_7cf6e7() {
- uvec2 arg_1 = uvec2(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec2 arg_1 = uvec2(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
index f19febe..e69790b 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_7cf6e7(texture2d<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- float4 arg_2 = float4(0.0f);
+ uint2 arg_1 = uint2(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
index d303e8f..78fb718 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_7cf6e7 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_7cf6e7
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_7cf6e7
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 %textureStore_7cf6e7
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_7cf6e7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_7cf6e7
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_7cf6e7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
index f93f1a0..4300c7d 100644
--- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
fn textureStore_7cf6e7() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl
index 247b97c..6357ca2 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: i32, value: vec4<f32>)
fn textureStore_7f7fae() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl
index 6d80e54..5cdb0c0 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_7f7fae() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl
index 6d80e54..5cdb0c0 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_7f7fae() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl
index a991af1..9b457ce 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_7f7fae(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm
index aace840..2727ee4 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_7f7fae = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_7f7fae
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_7f7fae
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_7f7fae
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_7f7fae
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_7f7fae
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_7f7fae
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl
index 9815899..b36d9e0 100644
--- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_7f7fae() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl
index f2bae96..be1271a 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<i32>, value: vec4<i32>)
fn textureStore_804942() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl
index f2f0dd3..e663487 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_804942() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl
index f2f0dd3..e663487 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_804942() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl
index e99ccc5..9cf56e0 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_804942() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_804942() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_804942() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl
index d2e755d..3d5af50 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_804942(texture2d<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- int4 arg_2 = int4(0);
+ int2 arg_1 = int2(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm
index b6cc2c9..a48d006 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/804942.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_804942 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_804942
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_804942
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 %textureStore_804942
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_804942
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_804942
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_804942
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl
index 171f249..ab6fef7 100644
--- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
fn textureStore_804942() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl
index d38a59f..96b5ec1 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8snorm, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_805dae() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl
index b251d9f..36697f9 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_805dae() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl
index b251d9f..36697f9 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_805dae() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl
index 77e3041..76c472a 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_805dae() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_805dae() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
void textureStore_805dae() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl
index 8ba8e48..a516aaf 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_805dae(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm
index 0bcb46d..9dc18fa 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/805dae.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_805dae = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_805dae
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_805dae
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 %textureStore_805dae
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_805dae
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_805dae
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_805dae
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl
index 3e6f446..4c2b4c3 100644
--- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
fn textureStore_805dae() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl
index 58dc1d8..e0476d9 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: i32, value: vec4<u32>)
fn textureStore_83bcc1() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl
index b606a3a..cd22634 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_83bcc1() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl
index b606a3a..cd22634 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_83bcc1() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl
index bf59f21..d1016d0 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_83bcc1(texture1d<uint, access::write> tint_symbol_1) {
int arg_1 = 1;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm
index da8b6bf..8bd3f62 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -46,41 +46,43 @@
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_83bcc1 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %21
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
OpStore %arg_1 %int_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %int %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_83bcc1
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_83bcc1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_83bcc1
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_83bcc1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_83bcc1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_83bcc1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl
index 7625aa6..eec57a4 100644
--- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_83bcc1() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl
index a48109e..71d6beb 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32float, write>, coords: i32, value: vec4<f32>)
fn textureStore_872747() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl
index 9c937a5..d70ea27 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_872747() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl
index 9c937a5..d70ea27 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_872747() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl
index fcb5caa..0306531 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_872747(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm
index a197ec4..8d8d31a 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/872747.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
OpCapability Image1D
@@ -44,40 +44,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_872747 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_872747
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_872747
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_872747
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_872747
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_872747
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_872747
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl
index 34d6be2..32ed1eb 100644
--- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_872747() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
index 5c1529a..8924093 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_8b9310() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
index 63e02b9..9be824a 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_8b9310() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
index 63e02b9..9be824a 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_8b9310() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
index 07179e6..01aa711 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_8b9310() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_8b9310() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_8b9310() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
index a56cd43..43ca7a4 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_8b9310(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
index 6dcd46e..c920206 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_8b9310 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_8b9310
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_8b9310
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 %textureStore_8b9310
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_8b9310
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_8b9310
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_8b9310
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
index f4095ea..aa74595 100644
--- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
fn textureStore_8b9310() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
index 4798b48..cf485b6 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
fn textureStore_8bb287() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
index 69cee8c..a21698e 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_8bb287() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
index 69cee8c..a21698e 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_8bb287() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
index 88ef4d6..0fd9536 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_8bb287() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_8bb287() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_8bb287() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
index f5202e7..576d3df 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_8bb287(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
index 1c82ad5..e21dcae 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8bb287 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %v4int %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %39 = OpLoad %uint %arg_2
+ %40 = OpCompositeConstruct %v3uint %37 %38 %39
+ %41 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_8bb287
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_8bb287
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_8bb287
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_8bb287
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_8bb287
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_8bb287
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
index a8e7a96..11d1d8f 100644
--- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
fn textureStore_8bb287() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
index d5510a9..df2a149 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16sint, write>, coords: u32, value: vec4<i32>)
fn textureStore_8c76e9() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
index 94d7ce9..6facd77 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_8c76e9() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
index 94d7ce9..6facd77 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_8c76e9() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
index c5331dd..08136cd 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_8c76e9(texture1d<int, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
index dff91f3..d1b88d3 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8c76e9 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %21
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
OpStore %arg_1 %uint_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %uint %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_8c76e9
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_8c76e9
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_8c76e9
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_8c76e9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_8c76e9
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_8c76e9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
index 41c78a3..8b5ce79 100644
--- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_8c76e9() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
index ea6156b..f17830e 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8uint, write>, coords: vec2<u32>, value: vec4<u32>)
fn textureStore_8dc54f() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
index 9356f2b..306c254 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_8dc54f() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
index 9356f2b..306c254 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_8dc54f() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
index c736632..53f7885 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_8dc54f() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_8dc54f() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
void textureStore_8dc54f() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
index a4b43c5..4655fad 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_8dc54f(texture2d<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- uint4 arg_2 = uint4(0u);
+ uint2 arg_1 = uint2(1u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
index f6c0c9d..5f5ada3 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8dc54f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_8dc54f
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_8dc54f
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 %textureStore_8dc54f
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_8dc54f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_8dc54f
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_8dc54f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
index 45a3bce..a655b36 100644
--- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
fn textureStore_8dc54f() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl
index 3920a85..96639ec 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
fn textureStore_8e0479() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl
index 24d93ef..e3875a4 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_8e0479() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl
index 24d93ef..e3875a4 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_8e0479() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl
index 0a78791..d070bb9 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8e0479() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8e0479() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8e0479() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl
index 6ad4aba..9634e28 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_8e0479(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm
index baca5da..e891980 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8e0479 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %39 = OpLoad %int %arg_2
+ %40 = OpCompositeConstruct %v3int %37 %38 %39
+ %41 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_8e0479
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_8e0479
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_8e0479
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_8e0479
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_8e0479
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_8e0479
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl
index 62cc919..bc56661 100644
--- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
fn textureStore_8e0479() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
index cadc370..963166a 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8unorm, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_8ed9f8() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
index 0660af5..b187376 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_8ed9f8() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
index 0660af5..b187376 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_8ed9f8() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
index 1f7cd6b..be631e3 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_8ed9f8() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_8ed9f8() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8) uniform highp writeonly image3D arg_0;
void textureStore_8ed9f8() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
index bb463d3..ee96051 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_8ed9f8(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
index f6fe75a..2ee7bf3 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_8ed9f8 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_8ed9f8
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_8ed9f8
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 %textureStore_8ed9f8
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_8ed9f8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_8ed9f8
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_8ed9f8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
index b650269..77a7d50 100644
--- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
fn textureStore_8ed9f8() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl
index dd7f731..12d406f 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba16sint, write>, coords: vec3<i32>, value: vec4<i32>)
fn textureStore_8f71a1() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl
index 513e377..dfdbda8 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_8f71a1() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl
index 513e377..dfdbda8 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_8f71a1() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl
index ebb51a8..90fded8 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_8f71a1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_8f71a1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16i) uniform highp writeonly iimage3D arg_0;
void textureStore_8f71a1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl
index bf5a54e..b3277b9 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_8f71a1(texture3d<int, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- int4 arg_2 = int4(0);
+ int3 arg_1 = int3(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm
index 1492698..2b06178 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8f71a1 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_8f71a1
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_8f71a1
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 %textureStore_8f71a1
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_8f71a1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_8f71a1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_8f71a1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl
index 709f78e..ff0e20c 100644
--- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
fn textureStore_8f71a1() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl
index 9c6fc3e..79cf930 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
fn textureStore_8ff674() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl
index 4265f0c..ade6cd2 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_8ff674() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl
index 4265f0c..ade6cd2 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_8ff674() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl
index cf082e9..4934abc 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8ff674() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8ff674() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_8ff674() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl
index 051723b..e7e60b1 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_8ff674(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm
index 768cb93..ef45f7e 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_8ff674 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_8ff674
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_8ff674
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_8ff674
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_8ff674
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_8ff674
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_8ff674
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl
index dc5d1f2..405abd5 100644
--- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
fn textureStore_8ff674() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl
index 6548f0e..0d1dcd6 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: u32, value: vec4<i32>)
fn textureStore_958353() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
index 07fc6aa..61de862 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_958353() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
index 07fc6aa..61de862 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_958353() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
index bad5668..d1fcf04 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_958353(texture1d<int, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
index bc99529..41534d4 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_958353 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %21
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
OpStore %arg_1 %uint_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %uint %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_958353
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_958353
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_958353
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_958353
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_958353
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_958353
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
index 3da0474..436e67b 100644
--- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_958353() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
index 404fd19..37080fa 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8snorm, write>, coords: u32, value: vec4<f32>)
fn textureStore_959d94() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
index 807d0de..9119e4a 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_959d94() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
index 807d0de..9119e4a 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_959d94() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
index bd790af..515eff2 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_959d94(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
index 33e3eab..f40074f 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/959d94.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_959d94 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_959d94
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_959d94
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_959d94
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_959d94
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_959d94
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_959d94
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
index d9300eb..1c4d7e2 100644
--- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_959d94() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
index 0b1037d..e93a933 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32sint, write>, coords: vec2<u32>, value: vec4<i32>)
fn textureStore_95e452() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
index e602bae..980ad86 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_95e452() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
index e602bae..980ad86 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_95e452() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
index e25384d..64f694f 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_95e452() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_95e452() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(r32i) uniform highp writeonly iimage2D arg_0;
void textureStore_95e452() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
index ce3297b..3326a49 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_95e452(texture2d<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- int4 arg_2 = int4(0);
+ uint2 arg_1 = uint2(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
index 1fd3674..04c19d1 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_95e452 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_95e452
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_95e452
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_95e452
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_95e452
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_95e452
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_95e452
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
index 6eaf3fa..ab3968fb 100644
--- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
fn textureStore_95e452() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl
index ee132a7..be1ee39 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32sint, write>, coords: i32, value: vec4<i32>)
fn textureStore_969534() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl
index abe1eac..105c863 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_969534() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl
index abe1eac..105c863 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_969534() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl
index aed04dd..ce5ff51 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_969534(texture1d<int, access::write> tint_symbol_1) {
int arg_1 = 1;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm
index 74def9c..475896e 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4int
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_969534 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %25
OpStore %arg_1 %int_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %int %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_969534
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_969534
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_969534
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_969534
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_969534
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_969534
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl
index 259cbc8..df5ca1d 100644
--- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_969534() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl
index bbd789c..c722fc7 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32sint, write>, coords: vec2<i32>, array_index: u32, value: vec4<i32>)
fn textureStore_9938b7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl
index 80692a9..392499e 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_9938b7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl
index 80692a9..392499e 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_9938b7() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl
index 3a267d7..d95242f 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_9938b7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_9938b7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_9938b7() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl
index 2a67476..5ebe2ac 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_9938b7(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm
index 3874961..35871f0 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,56 +41,59 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_9938b7 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_9938b7
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_9938b7
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_9938b7
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_9938b7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_9938b7
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_9938b7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl
index b2c3376..a4045a5 100644
--- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
fn textureStore_9938b7() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl
index d732945..add0fbc 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba32sint, write>, coords: vec3<i32>, value: vec4<i32>)
fn textureStore_9a3ecc() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl
index f6dae1c..0225f3a 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_9a3ecc() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl
index f6dae1c..0225f3a 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_9a3ecc() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl
index 9beb825..70c00a6 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_9a3ecc() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_9a3ecc() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32i) uniform highp writeonly iimage3D arg_0;
void textureStore_9a3ecc() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl
index 44b8e33..9c2fa40 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_9a3ecc(texture3d<int, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- int4 arg_2 = int4(0);
+ int3 arg_1 = int3(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm
index 7b6db7c..5548c20 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_9a3ecc = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_9a3ecc
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_9a3ecc
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 %textureStore_9a3ecc
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_9a3ecc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_9a3ecc
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_9a3ecc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl
index 04f9424..a64c7b3 100644
--- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
fn textureStore_9a3ecc() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl
index fd44463..43c26e5 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8unorm, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_9d8668() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl
index 0ad43ef..20c597c 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_9d8668() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl
index 0ad43ef..20c597c 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_9d8668() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl
index 5600dbe..27ef778 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_9d8668() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_9d8668() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8) uniform highp writeonly image2DArray arg_0;
void textureStore_9d8668() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl
index e0efa79..7bbee65 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_9d8668(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm
index 8c3095c..aa6a4d3 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_9d8668 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_9d8668
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_9d8668
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_9d8668
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_9d8668
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_9d8668
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_9d8668
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl
index b04ebc4..5241933 100644
--- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
fn textureStore_9d8668() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl
index 46518d6..68cd648 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_9d9cd5() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl
index 63531a6..4451b9d 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_9d9cd5() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl
index 63531a6..4451b9d 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_9d9cd5() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl
index 05a0d53..7bd328d 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_9d9cd5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_9d9cd5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32f) uniform highp writeonly image2DArray arg_0;
void textureStore_9d9cd5() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl
index 48036cd..b9e24ad 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_9d9cd5(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm
index 9e32370..4c7a242 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_9d9cd5 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_9d9cd5
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_9d9cd5
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_9d9cd5
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_9d9cd5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_9d9cd5
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_9d9cd5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl
index e34f0eb..4d43460 100644
--- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
fn textureStore_9d9cd5() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl
index 8175a48..859fd3c 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<i32>, value: vec4<i32>)
fn textureStore_9e3ec5() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl
index 0c02acb..22ca488 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_9e3ec5() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl
index 0c02acb..22ca488 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_9e3ec5() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl
index 19ace0b..33a744d 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_9e3ec5() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_9e3ec5() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_9e3ec5() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl
index 942418d..2c1da1d 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_9e3ec5(texture2d<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- int4 arg_2 = int4(0);
+ int2 arg_1 = int2(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm
index 4ce3d9e..e2c8e64 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_9e3ec5 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_9e3ec5
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_9e3ec5
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 %textureStore_9e3ec5
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_9e3ec5
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_9e3ec5
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_9e3ec5
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl
index a825923..786a000 100644
--- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
fn textureStore_9e3ec5() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
index 46cfbcb..fa9d76b 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rg32sint, write>, coords: vec2<u32>, value: vec4<i32>)
fn textureStore_9f5318() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
index 68caac1..db1e551 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_9f5318() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
index 68caac1..db1e551 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_9f5318() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
index 190288b..58486e7 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_9f5318(texture2d<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- int4 arg_2 = int4(0);
+ uint2 arg_1 = uint2(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
index 821ca97..93dec97 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,44 +42,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_9f5318 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_9f5318
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_9f5318
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_9f5318
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_9f5318
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_9f5318
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_9f5318
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
index 1ab319c..1b711ae 100644
--- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
fn textureStore_9f5318() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl
index dc02938..0ed2545 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
fn textureStore_9f7cea() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl
index 9decbcd..c06bbdf 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_9f7cea() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl
index 9decbcd..c06bbdf 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_9f7cea() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl
index a561d87..a429114 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_9f7cea() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_9f7cea() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_9f7cea() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl
index c6000bd..0b17dac 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_9f7cea(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm
index 71767cd..d6a2eed 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_9f7cea = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_9f7cea
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_9f7cea
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_9f7cea
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_9f7cea
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_9f7cea
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_9f7cea
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl
index 6b55981..c8cceff 100644
--- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
fn textureStore_9f7cea() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
index 7ff74cd..2088a74 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: u32, value: vec4<f32>)
fn textureStore_a0f96e() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
index 97ab824..24a137e 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_a0f96e() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
index 97ab824..24a137e 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_a0f96e() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
index 276a6f9..fe82253 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a0f96e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a0f96e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a0f96e() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
index 03c6f52..8d5db86 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_a0f96e(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
index 5277c6c..b04517c 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,52 +41,54 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_a0f96e = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2uint %arg_1
- %31 = OpCompositeExtract %uint %30 0
- %32 = OpCompositeExtract %uint %30 1
- %33 = OpLoad %uint %arg_2
- %34 = OpCompositeConstruct %v3uint %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2uint %arg_1
+ %34 = OpCompositeExtract %uint %33 0
+ %35 = OpCompositeExtract %uint %33 1
+ %36 = OpLoad %uint %arg_2
+ %37 = OpCompositeConstruct %v3uint %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_a0f96e
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_a0f96e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_a0f96e
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_a0f96e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_a0f96e
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_a0f96e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
index d9babfe..7ed7210 100644
--- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
fn textureStore_a0f96e() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
index d2c7483..4be46e8 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
fn textureStore_a1352c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
index f9c5558..c9ae03c 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_a1352c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
index f9c5558..c9ae03c 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_a1352c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
index 8d0b050..fba754f 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_a1352c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_a1352c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_a1352c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
index 275794f..2eecb90 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_a1352c(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
index 60d2114..b6dc94d 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_a1352c = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %v4int %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %39 = OpLoad %uint %arg_2
+ %40 = OpCompositeConstruct %v3uint %37 %38 %39
+ %41 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_a1352c
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_a1352c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_a1352c
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_a1352c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_a1352c
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_a1352c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
index 7132f14..0974686 100644
--- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
fn textureStore_a1352c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
index ded9f8e..dc78645 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: u32, value: vec4<f32>)
fn textureStore_a4c338() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
index fbaa791..6f5fbf1 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_a4c338() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
index fbaa791..6f5fbf1 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_a4c338() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
index f4ae68c..5643f17 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_a4c338(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
index 3ff8ca1..d92f716 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_a4c338 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_a4c338
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_a4c338
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_a4c338
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_a4c338
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_a4c338
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_a4c338
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
index 49ef550..96e6f1a 100644
--- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_a4c338() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
index 34851f6..7e5099f 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba32float, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_a5e80d() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
index 89f734c..1a1241a 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_a5e80d() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
index 89f734c..1a1241a 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_a5e80d() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
index 0bf3507..a694566 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_a5e80d() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_a5e80d() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32f) uniform highp writeonly image3D arg_0;
void textureStore_a5e80d() {
- uvec3 arg_1 = uvec3(0u);
- vec4 arg_2 = vec4(0.0f);
+ uvec3 arg_1 = uvec3(1u);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
index 09345d4..e00f52f 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_a5e80d(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
index fc7f43e..4833576 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_a5e80d = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_a5e80d
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_a5e80d
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 %textureStore_a5e80d
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_a5e80d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_a5e80d
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_a5e80d
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
index 3976579..61026f0 100644
--- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
fn textureStore_a5e80d() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl
index 45715a3..8b6da07 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_a6a986() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl
index 87243b7..5102816 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_a6a986() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl
index 87243b7..5102816 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_a6a986() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl
index 63d69b0..2249883 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a6a986() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a6a986() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16f) uniform highp writeonly image2DArray arg_0;
void textureStore_a6a986() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl
index b331c2d..e4fa7fa 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_a6a986(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm
index e1eee7c..4186142 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_a6a986 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_a6a986
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_a6a986
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_a6a986
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_a6a986
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_a6a986
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_a6a986
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl
index 5ca9a01..eae1eee 100644
--- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
fn textureStore_a6a986() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
index ee01fa7..fc02f9f 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32uint, write>, coords: u32, value: vec4<u32>)
fn textureStore_a6e78f() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
index 1bcd821..0314856 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_a6e78f() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
index 1bcd821..0314856 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_a6e78f() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
index c8eae4c..07ee9e6 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_a6e78f(texture1d<uint, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
index 8799481..85835b1 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_a6e78f = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %25
OpStore %arg_1 %uint_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4uint %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_a6e78f
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_a6e78f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_a6e78f
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_a6e78f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_a6e78f
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_a6e78f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
index 5c8eedc..182f6be 100644
--- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_a6e78f() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
index 0613670..4560e16 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba32uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
fn textureStore_a9426c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
index d8b282f..7e1d847 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_a9426c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
index d8b282f..7e1d847 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_a9426c() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
index 8289c23..61410c5 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_a9426c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_a9426c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_a9426c() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
index d04e4a7..cd1bca4 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_a9426c(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
index 51c831c..e9d783b 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %26 = OpConstantNull %v4uint
+ %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %30 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_a9426c = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2uint %arg_1
- %33 = OpCompositeExtract %uint %32 0
- %34 = OpCompositeExtract %uint %32 1
- %35 = OpLoad %uint %arg_2
- %36 = OpCompositeConstruct %v3uint %33 %34 %35
- %37 = OpLoad %v4uint %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %v4uint %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_a9426c
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_a9426c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_a9426c
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_a9426c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_a9426c
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_a9426c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
index 32f329d..457d2be 100644
--- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
fn textureStore_a9426c() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl
index e92ea38..8fb06fb 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rg32uint, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureStore_ac67aa() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl
index b36799d..4ff2367 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_ac67aa() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl
index b36799d..4ff2367 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_ac67aa() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl
index bff5a97..04fa0ba 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_ac67aa(texture3d<uint, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- uint4 arg_2 = uint4(0u);
+ int3 arg_1 = int3(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm
index df550ab..4fe2977 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,44 +42,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_ac67aa = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_ac67aa
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_ac67aa
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_ac67aa
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_ac67aa
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_ac67aa
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_ac67aa
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl
index 2145e3a..e6d0f63 100644
--- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, write>;
fn textureStore_ac67aa() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
index 30430d6..feace1b 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba32uint, write>, coords: vec2<u32>, value: vec4<u32>)
fn textureStore_aeb38a() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
index 66013e5..63340ad 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_aeb38a() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
index 66013e5..63340ad 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_aeb38a() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
index adbba2a..dc43e68 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_aeb38a() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_aeb38a() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_aeb38a() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
index d8e7b55..bf39553 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_aeb38a(texture2d<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- uint4 arg_2 = uint4(0u);
+ uint2 arg_1 = uint2(1u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
index 5e539c6..4a04967 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_aeb38a = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_aeb38a
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_aeb38a
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 %textureStore_aeb38a
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_aeb38a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_aeb38a
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_aeb38a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
index 588457c..cacf704 100644
--- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
fn textureStore_aeb38a() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
index 68a682b..c98d5f7 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8uint, write>, coords: vec2<u32>, array_index: u32, value: vec4<u32>)
fn textureStore_b42fd3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
index 9088ca1..a6cb47a 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_b42fd3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
index 9088ca1..a6cb47a 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_b42fd3() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
index 55586e2..3cf8367 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_b42fd3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_b42fd3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_b42fd3() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
index 9896b03..1f5972d 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_b42fd3(texture2d_array<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
index 9e42c7c..09ccb9d 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %24 = OpConstantNull %uint
+ %25 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %26 = OpConstantNull %v4uint
+ %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %30 = OpConstantNull %v4uint
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_b42fd3 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %24
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2uint %arg_1
- %33 = OpCompositeExtract %uint %32 0
- %34 = OpCompositeExtract %uint %32 1
- %35 = OpLoad %uint %arg_2
- %36 = OpCompositeConstruct %v3uint %33 %34 %35
- %37 = OpLoad %v4uint %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2uint %arg_1
+ %35 = OpCompositeExtract %uint %34 0
+ %36 = OpCompositeExtract %uint %34 1
+ %37 = OpLoad %uint %arg_2
+ %38 = OpCompositeConstruct %v3uint %35 %36 %37
+ %39 = OpLoad %v4uint %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_b42fd3
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_b42fd3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_b42fd3
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_b42fd3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_b42fd3
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_b42fd3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
index d150b77..3619cb1 100644
--- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
fn textureStore_b42fd3() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl
index c0eedb2..b0fa1ca 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<i32>, value: vec4<i32>)
fn textureStore_b706b1() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl
index 4e96114..bc4e46f 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_b706b1() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl
index 4e96114..bc4e46f 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_b706b1() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl
index 72e03e7..f8c512a 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_b706b1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_b706b1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_b706b1() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl
index 635cb6c..fed5f14 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_b706b1(texture3d<int, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- int4 arg_2 = int4(0);
+ int3 arg_1 = int3(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm
index 32c2bcb..363567e 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_b706b1 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_b706b1
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_b706b1
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 %textureStore_b706b1
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_b706b1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_b706b1
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_b706b1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl
index 42775a4..97673b3 100644
--- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
fn textureStore_b706b1() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
index ece1d5f..50126ba 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16uint, write>, coords: u32, value: vec4<u32>)
fn textureStore_b70ded() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
index d754d63..522ce4e 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_b70ded() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
index d754d63..522ce4e 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_b70ded() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
index 3a431a5..6256f77 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_b70ded(texture1d<uint, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
index a62ffee..5beaa6b 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_b70ded = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %25
OpStore %arg_1 %uint_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4uint %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_b70ded
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_b70ded
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_b70ded
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_b70ded
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_b70ded
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_b70ded
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
index 890424d..165633c 100644
--- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_b70ded() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
index 7384312..3e35e34 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16sint, write>, coords: vec2<u32>, value: vec4<i32>)
fn textureStore_b76ff3() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
index 8314e19..520d0cf 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_b76ff3() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
index 8314e19..520d0cf 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_b76ff3() {
- uint2 arg_1 = (0u).xx;
- int4 arg_2 = (0).xxxx;
+ uint2 arg_1 = (1u).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
index 70f8711..2357f24 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_b76ff3() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_b76ff3() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16i) uniform highp writeonly iimage2D arg_0;
void textureStore_b76ff3() {
- uvec2 arg_1 = uvec2(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec2 arg_1 = uvec2(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
index 27f65cd..c60afc3 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_b76ff3(texture2d<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- int4 arg_2 = int4(0);
+ uint2 arg_1 = uint2(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
index 0c8dff4..600e596 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_b76ff3 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v2uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v2uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_b76ff3
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_b76ff3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_b76ff3
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_b76ff3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_b76ff3
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_b76ff3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
index 31d8eb6..590b81a 100644
--- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
fn textureStore_b76ff3() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
index 521cf71..35f54ba 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32uint, write>, coords: u32, value: vec4<u32>)
fn textureStore_b77161() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
index fbf5804..db1ca7e 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_b77161() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
index fbf5804..db1ca7e 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_b77161() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
index dbc84ef..2b93c27 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_b77161(texture1d<uint, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
index 877baaa..743b5c7 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,42 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_b77161 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %25
OpStore %arg_1 %uint_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4uint %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_b77161
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_b77161
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_b77161
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_b77161
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_b77161
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_b77161
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
index 77b02dc..1d7c24f 100644
--- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_b77161() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl
index a15240c..90ca4db 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba8sint, write>, coords: vec2<i32>, value: vec4<i32>)
fn textureStore_bbcb7f() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl
index 366a2e7..edf7f91 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_bbcb7f() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl
index 366a2e7..edf7f91 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<int4> arg_0 : register(u0, space1);
void textureStore_bbcb7f() {
- int2 arg_1 = (0).xx;
- int4 arg_2 = (0).xxxx;
+ int2 arg_1 = (1).xx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl
index 2b486d8..73c6c3c 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_bbcb7f() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_bbcb7f() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8i) uniform highp writeonly iimage2D arg_0;
void textureStore_bbcb7f() {
- ivec2 arg_1 = ivec2(0);
- ivec4 arg_2 = ivec4(0);
+ ivec2 arg_1 = ivec2(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl
index 0a94285..16f0357 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_bbcb7f(texture2d<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- int4 arg_2 = int4(0);
+ int2 arg_1 = int2(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm
index 59e7b74..f3aaa71 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_bbcb7f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_bbcb7f
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_bbcb7f
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 %textureStore_bbcb7f
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_bbcb7f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_bbcb7f
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_bbcb7f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl
index 1bf17d9..1fa51e6 100644
--- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
fn textureStore_bbcb7f() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl
index 340cf9e..abb928b 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16float, write>, coords: vec2<i32>, value: vec4<f32>)
fn textureStore_be6e30() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl
index 67ff8b2..743fdfd 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_be6e30() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl
index 67ff8b2..743fdfd 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<float4> arg_0 : register(u0, space1);
void textureStore_be6e30() {
- int2 arg_1 = (0).xx;
- float4 arg_2 = (0.0f).xxxx;
+ int2 arg_1 = (1).xx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl
index 95fa82c..17fe18e 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_be6e30() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_be6e30() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16f) uniform highp writeonly image2D arg_0;
void textureStore_be6e30() {
- ivec2 arg_1 = ivec2(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec2 arg_1 = ivec2(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl
index ad189e0..87c31cb 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_be6e30(texture2d<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
- float4 arg_2 = float4(0.0f);
+ int2 arg_1 = int2(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm
index 57d0a8c..e9e6149 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v2int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_be6e30 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v2int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v2int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_be6e30
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_be6e30
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 %textureStore_be6e30
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_be6e30
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_be6e30
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_be6e30
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl
index 3fa9fde..523c97d 100644
--- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
fn textureStore_be6e30() {
- var arg_1 = vec2<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec2<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl
index d6c70e7..dcea5ed 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8sint, write>, coords: i32, value: vec4<i32>)
fn textureStore_bf775c() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl
index c75cb0b..f4a3b24 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_bf775c() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl
index c75cb0b..f4a3b24 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_bf775c() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl
index 24079fd..b918a1f 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_bf775c(texture1d<int, access::write> tint_symbol_1) {
int arg_1 = 1;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm
index c699fc0..d9b4438 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4int
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_bf775c = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %25
OpStore %arg_1 %int_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %int %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_bf775c
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_bf775c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_bf775c
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_bf775c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_bf775c
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_bf775c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl
index fd24109..d9e173e 100644
--- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_bf775c() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
index f2dbc70..b36ad4c 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32float, write>, coords: u32, value: vec4<f32>)
fn textureStore_c1f29e() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
index 36eb25d..aa5385d 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_c1f29e() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
index 36eb25d..aa5385d 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_c1f29e() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
index b3fdc8a..b90cc9c 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_c1f29e(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
index 183f38c..937da13 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_c1f29e = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_c1f29e
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_c1f29e
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_c1f29e
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_c1f29e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_c1f29e
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_c1f29e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
index 9d3ff1a..b302fbe 100644
--- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_c1f29e() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
index 91424c5..4a31b49 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16sint, write>, coords: vec2<u32>, array_index: u32, value: vec4<i32>)
fn textureStore_c2ca46() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
index ab57f4a..de55098 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_c2ca46() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
index ab57f4a..de55098 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_c2ca46() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
uint arg_2 = 1u;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
index 5f6b0be..2786286 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c2ca46() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c2ca46() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c2ca46() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
uint arg_2 = 1u;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
index ea9becc..711aa8e 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_c2ca46(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
uint arg_2 = 1u;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
index 5992bcf1..9824af59 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,54 +42,57 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
-%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %26 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_c2ca46 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %36 = OpLoad %uint %arg_2
- %37 = OpCompositeConstruct %v3uint %34 %35 %36
- %38 = OpLoad %v4int %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %39 = OpLoad %uint %arg_2
+ %40 = OpCompositeConstruct %v3uint %37 %38 %39
+ %41 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_c2ca46
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_c2ca46
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_c2ca46
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_c2ca46
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_c2ca46
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_c2ca46
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
index 1028c67..621ebe8 100644
--- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
fn textureStore_c2ca46() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1u;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl
index 759c4b3..fd11547 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<u32>, array_index: i32, value: vec4<i32>)
fn textureStore_c32905() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl
index 4d99be6..060ff84 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_c32905() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl
index 4d99be6..060ff84 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_c32905() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl
index 4a695bb..b7b208a 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c32905() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c32905() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_c32905() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl
index 52e8a02..59fd22c 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_c32905(texture2d_array<int, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm
index 48e2220..6b25e8c 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %19 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %23 = OpConstantNull %v2uint
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %27 = OpConstantNull %v4int
+ %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %32 = OpConstantNull %v4int
%v3uint = OpTypeVector %uint 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_c32905 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4int Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2uint %arg_1
- %34 = OpCompositeExtract %uint %33 0
- %35 = OpCompositeExtract %uint %33 1
- %37 = OpLoad %int %arg_2
- %36 = OpBitcast %uint %37
- %38 = OpCompositeConstruct %v3uint %34 %35 %36
- %39 = OpLoad %v4int %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2uint %arg_1
+ %37 = OpCompositeExtract %uint %36 0
+ %38 = OpCompositeExtract %uint %36 1
+ %40 = OpLoad %int %arg_2
+ %39 = OpBitcast %uint %40
+ %41 = OpCompositeConstruct %v3uint %37 %38 %39
+ %42 = OpLoad %v4int %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_c32905
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_c32905
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_c32905
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_c32905
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_c32905
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_c32905
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl
index 73f1d99..d8002b4 100644
--- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
fn textureStore_c32905() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl
index 3f51529..4f58ba3 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba16float, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_c5af1e() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl
index c52db8f..f92b8f6 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_c5af1e() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl
index c52db8f..f92b8f6 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_c5af1e() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl
index d75b39b..cd1558a 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_c5af1e() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_c5af1e() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16f) uniform highp writeonly image3D arg_0;
void textureStore_c5af1e() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl
index 6e9206f..1abb310 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_c5af1e(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm
index 0a7e655..cbb579c 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_c5af1e = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_c5af1e
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_c5af1e
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 %textureStore_c5af1e
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_c5af1e
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_c5af1e
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_c5af1e
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl
index cc2c9d1..71ea840 100644
--- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
fn textureStore_c5af1e() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl
index ce4bcc6..e42fa06 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<i32>, array_index: i32, value: vec4<f32>)
fn textureStore_c863be() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl
index bf1dd2c..d755997 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_c863be() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl
index bf1dd2c..d755997 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_c863be() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl
index 3b4ee66..3b0b452 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_c863be(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm
index 49ae3b6..5787add 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,52 +42,54 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %36 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %39 = OpTypeFunction %v4float
%textureStore_c863be = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %28 = OpLoad %11 %arg_0
- %30 = OpLoad %v2int %arg_1
- %31 = OpCompositeExtract %int %30 0
- %32 = OpCompositeExtract %int %30 1
- %33 = OpLoad %int %arg_2
- %34 = OpCompositeConstruct %v3int %31 %32 %33
- %35 = OpLoad %v4float %arg_3
- OpImageWrite %28 %34 %35
+ OpStore %arg_3 %27
+ %31 = OpLoad %11 %arg_0
+ %33 = OpLoad %v2int %arg_1
+ %34 = OpCompositeExtract %int %33 0
+ %35 = OpCompositeExtract %int %33 1
+ %36 = OpLoad %int %arg_2
+ %37 = OpCompositeConstruct %v3int %34 %35 %36
+ %38 = OpLoad %v4float %arg_3
+ OpImageWrite %31 %37 %38
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %36
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_c863be
+%vertex_main_inner = OpFunction %v4float None %39
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_c863be
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %41 = OpLabel
- %42 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %45
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
- %45 = OpLabel
- %46 = OpFunctionCall %void %textureStore_c863be
+ %47 = OpLabel
+ %48 = OpFunctionCall %void %textureStore_c863be
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_c863be
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_c863be
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl
index ca615c5..22fc708 100644
--- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
fn textureStore_c863be() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
index 92e3678..d8b0fc5 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8sint, write>, coords: vec3<u32>, value: vec4<i32>)
fn textureStore_cb3b0b() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
index 6f20c68..158f60c 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_cb3b0b() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
index 6f20c68..158f60c 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_cb3b0b() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
index 96f8c65..9b2d5e6 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_cb3b0b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_cb3b0b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8i) uniform highp writeonly iimage3D arg_0;
void textureStore_cb3b0b() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
index 4b6e161..c3fa3cea 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_cb3b0b(texture3d<int, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- int4 arg_2 = int4(0);
+ uint3 arg_1 = uint3(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
index 363baf6..0c3ca78 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_cb3b0b = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_cb3b0b
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_cb3b0b
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_cb3b0b
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_cb3b0b
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_cb3b0b
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_cb3b0b
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
index 846d119..f7148a3 100644
--- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
fn textureStore_cb3b0b() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
index 5b2e2f3..c369da8 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: u32, value: vec4<u32>)
fn textureStore_d26166() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
index 8ec5059..35e987a 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_d26166() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
index 8ec5059..35e987a 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_d26166() {
uint arg_1 = 1u;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
index 22472ce..121c532 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_d26166(texture1d<uint, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
index 922800c..ee06594 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -44,41 +44,42 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4uint
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_d26166 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %25
OpStore %arg_1 %uint_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %uint %arg_1
+ %29 = OpLoad %v4uint %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_d26166
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_d26166
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_d26166
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_d26166
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_d26166
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_d26166
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
index 9d51a44..ce91750 100644
--- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_d26166() {
var arg_1 = 1u;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl
index 82ce654..561690e 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_d55e65() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl
index 7933088..3804b29 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_d55e65() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl
index 7933088..3804b29 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_d55e65() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl
index 87199ca..9b95ec7 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_d55e65() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_d55e65() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_d55e65() {
- uvec2 arg_1 = uvec2(0u);
+ uvec2 arg_1 = uvec2(1u);
int arg_2 = 1;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl
index 11b7b3b..4150e81 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_d55e65(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm
index e36f65d..a2014a6 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_d55e65 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_d55e65
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_d55e65
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_d55e65
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_d55e65
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_d55e65
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_d55e65
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl
index 939d999..a3cea00 100644
--- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
fn textureStore_d55e65() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl
index 5f1aa47..c6dc778 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rg32sint, write>, coords: i32, value: vec4<i32>)
fn textureStore_d73b5c() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl
index e4f893a..f0a3ecc 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_d73b5c() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl
index e4f893a..f0a3ecc 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_d73b5c() {
int arg_1 = 1;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl
index 0fe1471..8346f03 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_d73b5c(texture1d<int, access::write> tint_symbol_1) {
int arg_1 = 1;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm
index b558399..5b3270b 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 43
+; Bound: 44
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,42 @@
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %25 = OpConstantNull %v4int
+ %30 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_d73b5c = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %25
OpStore %arg_1 %int_1
OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %27 = OpLoad %11 %arg_0
+ %28 = OpLoad %int %arg_1
+ %29 = OpLoad %v4int %arg_2
+ OpImageWrite %27 %28 %29
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_d73b5c
+%vertex_main_inner = OpFunction %v4float None %30
+ %32 = OpLabel
+ %33 = OpFunctionCall %void %textureStore_d73b5c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %34 = OpLabel
- %35 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %35
+ %35 = OpLabel
+ %36 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %36
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %38 = OpLabel
- %39 = OpFunctionCall %void %textureStore_d73b5c
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_d73b5c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_d73b5c
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_d73b5c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl
index b5c5458..9509d8c 100644
--- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_d73b5c() {
var arg_1 = 1i;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
index 14bffb5..6841e09 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rg32sint, write>, coords: vec3<u32>, value: vec4<i32>)
fn textureStore_d82b0a() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
index f01ea8b..ea9cc97 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_d82b0a() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
index f01ea8b..ea9cc97 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_d82b0a() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
index edc5f9a..e81fb99 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_d82b0a(texture3d<int, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- int4 arg_2 = int4(0);
+ uint3 arg_1 = uint3(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
index 9e0a95c..f4e3cee 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,44 +42,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_d82b0a = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_d82b0a
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_d82b0a
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_d82b0a
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_d82b0a
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_d82b0a
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_d82b0a
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
index db0d94f..8d992f8 100644
--- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
fn textureStore_d82b0a() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
index 38c407e..a5df6eb 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<rgba16uint, write>, coords: vec2<u32>, value: vec4<u32>)
fn textureStore_db92a2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
index 554bd67..992e579 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_db92a2() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
index 554bd67..992e579 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_db92a2() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
index 26e0bf5..c4cb3ba 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_db92a2() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_db92a2() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
void textureStore_db92a2() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
index 71a107a..789c06b 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_db92a2(texture2d<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- uint4 arg_2 = uint4(0u);
+ uint2 arg_1 = uint2(1u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
index 7a570ae..400c092 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_db92a2 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_db92a2
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_db92a2
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 %textureStore_db92a2
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_db92a2
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_db92a2
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_db92a2
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
index 8754246..e6af452 100644
--- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
fn textureStore_db92a2() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl
index a026e43..79fbb32 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8snorm, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_dd7d81() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl
index 303f614..c632f94 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_dd7d81() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl
index 303f614..c632f94 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_dd7d81() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl
index 2a86984..60fac80 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_dd7d81() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_dd7d81() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
void textureStore_dd7d81() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl
index e87f2ed..30a6239 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_dd7d81(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm
index 8e21c4c..ff057ab 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_dd7d81 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_dd7d81
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_dd7d81
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 %textureStore_dd7d81
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_dd7d81
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_dd7d81
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_dd7d81
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl
index 812587c..dfe4f3c 100644
--- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
fn textureStore_dd7d81() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl
index 29a96ad..5796c71 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: i32, value: vec4<u32>)
fn textureStore_dde364() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl
index 8bda58b..c51681f 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_dde364() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl
index 8bda58b..c51681f 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_dde364() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl
index 8ac8d03..6073ae5 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_dde364(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm
index 39505fa..84e5b5f 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 53
+; Bound: 56
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -43,54 +43,57 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %26 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %39 = OpTypeFunction %v4float
+ %42 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_dde364 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_int Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_int Function %26
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %int_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %36 = OpLoad %int %arg_2
- %37 = OpCompositeConstruct %v3int %34 %35 %36
- %38 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %37 %38
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %39 = OpLoad %int %arg_2
+ %40 = OpCompositeConstruct %v3int %37 %38 %39
+ %41 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %39
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_dde364
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_dde364
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %44 = OpLabel
- %45 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %45
+ %47 = OpLabel
+ %48 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %48
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %48 = OpLabel
- %49 = OpFunctionCall %void %textureStore_dde364
+ %51 = OpLabel
+ %52 = OpFunctionCall %void %textureStore_dde364
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %51 = OpLabel
- %52 = OpFunctionCall %void %textureStore_dde364
+ %54 = OpLabel
+ %55 = OpFunctionCall %void %textureStore_dde364
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl
index f9ea808..7ac5a16 100644
--- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
fn textureStore_dde364() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
index 74eb6ce..3bd65d2 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<r32sint, write>, coords: u32, value: vec4<i32>)
fn textureStore_de4b94() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
index 298f0d2..66c4a17 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_de4b94() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
index 298f0d2..66c4a17 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_de4b94() {
uint arg_1 = 1u;
- int4 arg_2 = (0).xxxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
index 92bf211..f02fdc7 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_de4b94(texture1d<int, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- int4 arg_2 = int4(0);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
index 4d60d83..e306fb9 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_de4b94 = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %21
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
OpStore %arg_1 %uint_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %uint %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_de4b94
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_de4b94
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_de4b94
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_de4b94
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_de4b94
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_de4b94
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
index 112c6b8..98cdbb0 100644
--- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_de4b94() {
var arg_1 = 1u;
- var arg_2 = vec4<i32>();
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl
index 7d52fc2..b03549c 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<r32float, write>, coords: vec2<i32>, array_index: u32, value: vec4<f32>)
fn textureStore_df2ca4() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl
index 46b5844..1dfaf0f 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_df2ca4() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl
index 46b5844..1dfaf0f 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_df2ca4() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl
index e7547d3..047cb16 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_df2ca4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_df2ca4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(r32f) uniform highp writeonly image2DArray arg_0;
void textureStore_df2ca4() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- vec4 arg_3 = vec4(0.0f);
+ vec4 arg_3 = vec4(1.0f);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl
index d3eea8d..633b3cf 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_df2ca4(texture2d_array<float, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm
index 90f4c06..aa53658 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.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
@@ -41,54 +41,57 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_df2ca4 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %uint_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2int %arg_1
- %32 = OpCompositeExtract %int %31 0
- %33 = OpCompositeExtract %int %31 1
- %35 = OpLoad %uint %arg_2
- %34 = OpBitcast %int %35
- %36 = OpCompositeConstruct %v3int %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2int %arg_1
+ %36 = OpCompositeExtract %int %35 0
+ %37 = OpCompositeExtract %int %35 1
+ %39 = OpLoad %uint %arg_2
+ %38 = OpBitcast %int %39
+ %40 = OpCompositeConstruct %v3int %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_df2ca4
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_df2ca4
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_df2ca4
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_df2ca4
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_df2ca4
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_df2ca4
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl
index 60250cc..4775cc0 100644
--- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
fn textureStore_df2ca4() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl
index f8595d4..8371fa3 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32float, write>, coords: vec2<u32>, array_index: i32, value: vec4<f32>)
fn textureStore_dfa9a1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
index 0342085..fef042f 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_dfa9a1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
index 0342085..fef042f 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<float4> arg_0 : register(u0, space1);
void textureStore_dfa9a1() {
- uint2 arg_1 = (0u).xx;
+ uint2 arg_1 = (1u).xx;
int arg_2 = 1;
- float4 arg_3 = (0.0f).xxxx;
+ float4 arg_3 = (1.0f).xxxx;
arg_0[uint3(arg_1, uint(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl
index 48961ca..3ed3139 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_dfa9a1(texture2d_array<float, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
+ uint2 arg_1 = uint2(1u);
int arg_2 = 1;
- float4 arg_3 = float4(0.0f);
+ float4 arg_3 = float4(1.0f);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm
index 1bf8a16..16fa8ef 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.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
OpCapability StorageImageExtendedFormats
@@ -42,54 +42,57 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
- %25 = OpConstantNull %int
+ %27 = OpConstantNull %int
+ %float_1 = OpConstant %float 1
+ %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_v4float = OpTypePointer Function %v4float
%v3uint = OpTypeVector %uint 3
- %38 = OpTypeFunction %v4float
- %float_1 = OpConstant %float 1
+ %42 = OpTypeFunction %v4float
%textureStore_dfa9a1 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %27
%arg_3 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %5
- %29 = OpLoad %11 %arg_0
- %31 = OpLoad %v2uint %arg_1
- %32 = OpCompositeExtract %uint %31 0
- %33 = OpCompositeExtract %uint %31 1
- %35 = OpLoad %int %arg_2
- %34 = OpBitcast %uint %35
- %36 = OpCompositeConstruct %v3uint %32 %33 %34
- %37 = OpLoad %v4float %arg_3
- OpImageWrite %29 %36 %37
+ OpStore %arg_3 %29
+ %33 = OpLoad %11 %arg_0
+ %35 = OpLoad %v2uint %arg_1
+ %36 = OpCompositeExtract %uint %35 0
+ %37 = OpCompositeExtract %uint %35 1
+ %39 = OpLoad %int %arg_2
+ %38 = OpBitcast %uint %39
+ %40 = OpCompositeConstruct %v3uint %36 %37 %38
+ %41 = OpLoad %v4float %arg_3
+ OpImageWrite %33 %40 %41
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_dfa9a1
+%vertex_main_inner = OpFunction %v4float None %42
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_dfa9a1
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %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 %12
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_dfa9a1
+ %50 = OpLabel
+ %51 = OpFunctionCall %void %textureStore_dfa9a1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_dfa9a1
+ %53 = OpLabel
+ %54 = OpFunctionCall %void %textureStore_dfa9a1
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl
index f811438..b09f84a 100644
--- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
fn textureStore_dfa9a1() {
- var arg_1 = vec2<u32>();
+ var arg_1 = vec2<u32>(1u);
var arg_2 = 1i;
- var arg_3 = vec4<f32>();
+ var arg_3 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl
index 760a063..175a7f5 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
fn textureStore_dffb13() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl
index 532d05c..ff6b8f4 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_dffb13() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl
index 532d05c..ff6b8f4 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_dffb13() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl
index 7218365..6d26bd7 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_dffb13(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm
index 35fc43a..39fdc16 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -43,55 +43,58 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_dffb13 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_dffb13
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_dffb13
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_dffb13
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_dffb13
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_dffb13
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_dffb13
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl
index e3ba416..be48ae6 100644
--- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
fn textureStore_dffb13() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
index c05dac5..c8fbc82 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba8unorm, write>, coords: u32, value: vec4<f32>)
fn textureStore_e7c6d8() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
index af74e51..c41266d 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_e7c6d8() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
index af74e51..c41266d 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_e7c6d8() {
uint arg_1 = 1u;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
index 9b202d0..5d63f1b 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_e7c6d8(texture1d<float, access::write> tint_symbol_1) {
uint arg_1 = 1u;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
index e7268c9..9e5c49a 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_e7c6d8 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_uint Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %uint_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %uint %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_e7c6d8
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_e7c6d8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_e7c6d8
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_e7c6d8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_e7c6d8
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_e7c6d8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
index 7815feb..3998c63 100644
--- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_e7c6d8() {
var arg_1 = 1u;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl
index bc4a830..34b40f5 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba16float, write>, coords: i32, value: vec4<f32>)
fn textureStore_e885e8() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl
index 3a6acf9..0cb3ecc 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_e885e8() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl
index 3a6acf9..0cb3ecc 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_e885e8() {
int arg_1 = 1;
- float4 arg_2 = (0.0f).xxxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl
index 67de77c..cdb58ca 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_e885e8(texture1d<float, access::write> tint_symbol_1) {
int arg_1 = 1;
- float4 arg_2 = float4(0.0f);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm
index de6672d..948a8a3 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.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
OpCapability Image1D
@@ -43,40 +43,41 @@
%int_1 = OpConstant %int 1
%_ptr_Function_int = OpTypePointer Function %int
%20 = OpConstantNull %int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
+ %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %29 = OpTypeFunction %v4float
%textureStore_e885e8 = OpFunction %void None %12
%15 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %20
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
OpStore %arg_1 %int_1
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_2 %22
+ %26 = OpLoad %11 %arg_0
+ %27 = OpLoad %int %arg_1
+ %28 = OpLoad %v4float %arg_2
+ OpImageWrite %26 %27 %28
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_e885e8
+%vertex_main_inner = OpFunction %v4float None %29
+ %31 = OpLabel
+ %32 = OpFunctionCall %void %textureStore_e885e8
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %12
- %32 = OpLabel
- %33 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %33
+ %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
- %36 = OpLabel
- %37 = OpFunctionCall %void %textureStore_e885e8
+ %37 = OpLabel
+ %38 = OpFunctionCall %void %textureStore_e885e8
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_e885e8
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %textureStore_e885e8
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl
index 32e9ffd..3fcda8b 100644
--- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_e885e8() {
var arg_1 = 1i;
- var arg_2 = vec4<f32>();
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
index dfffdaa..cf4ab0c 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_2d<r32uint, write>, coords: vec2<u32>, value: vec4<u32>)
fn textureStore_e8cbf7() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
index 645dff7..165e0bc 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_e8cbf7() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
index 645dff7..165e0bc 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture2D<uint4> arg_0 : register(u0, space1);
void textureStore_e8cbf7() {
- uint2 arg_1 = (0u).xx;
- uint4 arg_2 = (0u).xxxx;
+ uint2 arg_1 = (1u).xx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
index 5852ebd..4049bc9 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_e8cbf7() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_e8cbf7() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(r32ui) uniform highp writeonly uimage2D arg_0;
void textureStore_e8cbf7() {
- uvec2 arg_1 = uvec2(0u);
- uvec4 arg_2 = uvec4(0u);
+ uvec2 arg_1 = uvec2(1u);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, ivec2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
index 92344cd..4412956 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_e8cbf7(texture2d<uint, access::write> tint_symbol_1) {
- uint2 arg_1 = uint2(0u);
- uint4 arg_2 = uint4(0u);
+ uint2 arg_1 = uint2(1u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint2(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
index 83db776..4ba7a7b 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
- %18 = OpConstantNull %v2uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v2uint %uint_1 %uint_1
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+ %22 = OpConstantNull %v2uint
%v4uint = OpTypeVector %uint 4
- %22 = OpConstantNull %v4uint
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_e8cbf7 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2uint Function %18
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v2uint %arg_1
- %28 = OpLoad %v4uint %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v2uint Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v2uint %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_e8cbf7
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_e8cbf7
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 %textureStore_e8cbf7
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_e8cbf7
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_e8cbf7
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_e8cbf7
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
index f43ca9b..0402200 100644
--- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
fn textureStore_e8cbf7() {
- var arg_1 = vec2<u32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec2<u32>(1u);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl
index 098cfad..36372e1 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<r32float, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_eb702f() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl
index 55d4e79..ddfc382 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_eb702f() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl
index 55d4e79..ddfc382 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_eb702f() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl
index 5dfa23d..89e2a01 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_eb702f() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_eb702f() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32f) uniform highp writeonly image3D arg_0;
void textureStore_eb702f() {
- ivec3 arg_1 = ivec3(0);
- vec4 arg_2 = vec4(0.0f);
+ ivec3 arg_1 = ivec3(1);
+ vec4 arg_2 = vec4(1.0f);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl
index 9926e89..550c53e 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_eb702f(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm
index 8d9bddb..f64b950 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.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
@@ -40,42 +40,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_eb702f = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_eb702f
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_eb702f
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 %textureStore_eb702f
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_eb702f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_eb702f
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_eb702f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl
index bc8a259..9b56f0d 100644
--- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
fn textureStore_eb702f() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl
index 0ec2c27..bf2ec48 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<i32>, value: vec4<i32>)
fn textureStore_eb78b9() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl
index c798708..626d4a8 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_eb78b9() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl
index c798708..626d4a8 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_eb78b9() {
- int3 arg_1 = (0).xxx;
- int4 arg_2 = (0).xxxx;
+ int3 arg_1 = (1).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl
index 7a6aa12..ba4886c 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_eb78b9() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_eb78b9() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_eb78b9() {
- ivec3 arg_1 = ivec3(0);
- ivec4 arg_2 = ivec4(0);
+ ivec3 arg_1 = ivec3(1);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl
index e5b872f..135de26 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_eb78b9(texture3d<int, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- int4 arg_2 = int4(0);
+ int3 arg_1 = int3(1);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm
index ca55182..b48dd46 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.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,44 +40,47 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %22 = OpConstantNull %v3int
%v4int = OpTypeVector %int 4
- %22 = OpConstantNull %v4int
+ %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %29 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4int
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_eb78b9 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
- %arg_2 = OpVariable %_ptr_Function_v4int Function %22
- OpStore %arg_1 %18
- OpStore %arg_2 %22
- %26 = OpLoad %11 %arg_0
- %27 = OpLoad %v3int %arg_1
- %28 = OpLoad %v4int %arg_2
- OpImageWrite %26 %27 %28
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %27
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %v3int %arg_1
+ %31 = OpLoad %v4int %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
- %31 = OpLabel
- %32 = OpFunctionCall %void %textureStore_eb78b9
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_eb78b9
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 %textureStore_eb78b9
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_eb78b9
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %41 = OpLabel
- %42 = OpFunctionCall %void %textureStore_eb78b9
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_eb78b9
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl
index 2d7e635..cbee439 100644
--- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
fn textureStore_eb78b9() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl
index 19d501f..6b99bfa 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<i32>, value: vec4<f32>)
fn textureStore_ee6acc() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl
index a6ce8c7..bfaac79 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_ee6acc() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl
index a6ce8c7..bfaac79 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_ee6acc() {
- int3 arg_1 = (0).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ int3 arg_1 = (1).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl
index 9b5c922..ad212b6 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_ee6acc(texture3d<float, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- float4 arg_2 = float4(0.0f);
+ int3 arg_1 = int3(1);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm
index bc3df6d..a004106 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.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
OpCapability StorageImageExtendedFormats
@@ -41,42 +41,45 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %18 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3int
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_ee6acc = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3int %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3int %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_ee6acc
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_ee6acc
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 %textureStore_ee6acc
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_ee6acc
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_ee6acc
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_ee6acc
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl
index 8ba6d40..c55bbcd 100644
--- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
fn textureStore_ee6acc() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl
index fa28513..9154768 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<r32uint, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureStore_ef9f2f() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl
index ded9f95..be459f0 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_ef9f2f() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl
index ded9f95..be459f0 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_ef9f2f() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl
index 040973d..03179e4 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_ef9f2f() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(r32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_ef9f2f() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(r32ui) uniform highp writeonly uimage3D arg_0;
void textureStore_ef9f2f() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl
index 9c6a6bd..f7972bd 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_ef9f2f(texture3d<uint, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- uint4 arg_2 = uint4(0u);
+ int3 arg_1 = int3(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm
index 4148955..f841295 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_ef9f2f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_ef9f2f
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_ef9f2f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_ef9f2f
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_ef9f2f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_ef9f2f
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_ef9f2f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl
index 1045a89..dd6845f 100644
--- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, write>;
fn textureStore_ef9f2f() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
index 1014342..f2caa3c 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<r32sint, write>, coords: vec3<u32>, value: vec4<i32>)
fn textureStore_f1e6d3() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
index 56d522a..0563325 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_f1e6d3() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
index 56d522a..0563325 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<int4> arg_0 : register(u0, space1);
void textureStore_f1e6d3() {
- uint3 arg_1 = (0u).xxx;
- int4 arg_2 = (0).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ int4 arg_2 = (1).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
index a4e196b..1276474 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_f1e6d3() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -25,8 +25,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_f1e6d3() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
@@ -42,8 +42,8 @@
layout(r32i) uniform highp writeonly iimage3D arg_0;
void textureStore_f1e6d3() {
- uvec3 arg_1 = uvec3(0u);
- ivec4 arg_2 = ivec4(0);
+ uvec3 arg_1 = uvec3(1u);
+ ivec4 arg_2 = ivec4(1);
imageStore(arg_0, ivec3(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
index c32f6a9..38b3da4 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_f1e6d3(texture3d<int, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- int4 arg_2 = int4(0);
+ uint3 arg_1 = uint3(1u);
+ int4 arg_2 = int4(1);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
index baf5519..8e17d81 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %19 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+ %23 = OpConstantNull %v3uint
%v4int = OpTypeVector %int 4
- %23 = OpConstantNull %v4int
+ %int_1 = OpConstant %int 1
+ %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4int
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_f1e6d3 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %19
- %arg_2 = OpVariable %_ptr_Function_v4int Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3uint %arg_1
- %29 = OpLoad %v4int %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4int Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3uint %arg_1
+ %33 = OpLoad %v4int %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_f1e6d3
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_f1e6d3
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_f1e6d3
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_f1e6d3
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_f1e6d3
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_f1e6d3
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
index 3fe60f3..2f64952 100644
--- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
fn textureStore_f1e6d3() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<i32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl
index b58c3ff..8068cf5 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rgba8uint, write>, coords: vec3<i32>, value: vec4<u32>)
fn textureStore_f8dead() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl
index 94111fb..5ada5ff 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_f8dead() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl
index 94111fb..5ada5ff 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<uint4> arg_0 : register(u0, space1);
void textureStore_f8dead() {
- int3 arg_1 = (0).xxx;
- uint4 arg_2 = (0u).xxxx;
+ int3 arg_1 = (1).xxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl
index 3583671..c0607a9 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl
@@ -2,8 +2,8 @@
layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
void textureStore_f8dead() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -25,8 +25,8 @@
layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
void textureStore_f8dead() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
@@ -42,8 +42,8 @@
layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
void textureStore_f8dead() {
- ivec3 arg_1 = ivec3(0);
- uvec4 arg_2 = uvec4(0u);
+ ivec3 arg_1 = ivec3(1);
+ uvec4 arg_2 = uvec4(1u);
imageStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl
index 4e6da98..735272b 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_f8dead(texture3d<uint, access::write> tint_symbol_1) {
- int3 arg_1 = int3(0);
- uint4 arg_2 = uint4(0u);
+ int3 arg_1 = int3(1);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm
index 2a9e3e8..a125397 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 48
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,44 +41,48 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
- %19 = OpConstantNull %v3int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1
%_ptr_Function_v3int = OpTypePointer Function %v3int
+ %23 = OpConstantNull %v3int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %29 = OpConstantNull %v4uint
+ %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_f8dead = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3int Function %19
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
- OpStore %arg_1 %19
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %v3int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ %arg_1 = OpVariable %_ptr_Function_v3int Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %29
+ OpStore %arg_1 %20
+ OpStore %arg_2 %26
+ %31 = OpLoad %11 %arg_0
+ %32 = OpLoad %v3int %arg_1
+ %33 = OpLoad %v4uint %arg_2
+ OpImageWrite %31 %32 %33
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_f8dead
+%vertex_main_inner = OpFunction %v4float None %34
+ %36 = OpLabel
+ %37 = OpFunctionCall %void %textureStore_f8dead
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %39 = OpLabel
+ %40 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %40
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_f8dead
+ %43 = OpLabel
+ %44 = OpFunctionCall %void %textureStore_f8dead
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_f8dead
+ %46 = OpLabel
+ %47 = OpFunctionCall %void %textureStore_f8dead
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl
index 52a1d3e..b510b95 100644
--- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, write>;
fn textureStore_f8dead() {
- var arg_1 = vec3<i32>();
- var arg_2 = vec4<u32>();
+ var arg_1 = vec3<i32>(1i);
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl
index d1d2815..101ef88 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rg32sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
fn textureStore_f9be83() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl
index 129bfb8..4b36d74 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_f9be83() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl
index 129bfb8..4b36d74 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_f9be83() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl
index 0217d28..07cbf5c 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_f9be83(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm
index c7ee036..4f8bbfb 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpCapability StorageImageExtendedFormats
@@ -42,54 +42,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %26 = OpConstantNull %v4int
+ %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_f9be83 = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_v4int Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2int %arg_1
- %33 = OpCompositeExtract %int %32 0
- %34 = OpCompositeExtract %int %32 1
- %35 = OpLoad %int %arg_2
- %36 = OpCompositeConstruct %v3int %33 %34 %35
- %37 = OpLoad %v4int %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %v4int %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_f9be83
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_f9be83
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_f9be83
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_f9be83
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_f9be83
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_f9be83
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl
index 3e9226e..d7ad8ba 100644
--- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
fn textureStore_f9be83() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl
index 7b6b6af..2b020b6 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl
@@ -25,7 +25,7 @@
// fn textureStore(texture: texture_storage_1d<rgba32uint, write>, coords: i32, value: vec4<u32>)
fn textureStore_fb9a8f() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl
index 7e5b23d..2809d9d 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_fb9a8f() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl
index 7e5b23d..2809d9d 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl
@@ -2,7 +2,7 @@
void textureStore_fb9a8f() {
int arg_1 = 1;
- uint4 arg_2 = (0u).xxxx;
+ uint4 arg_2 = (1u).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl
index a808ba3..9e3b7d1 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl
@@ -3,7 +3,7 @@
using namespace metal;
void textureStore_fb9a8f(texture1d<uint, access::write> tint_symbol_1) {
int arg_1 = 1;
- uint4 arg_2 = uint4(0u);
+ uint4 arg_2 = uint4(1u);
tint_symbol_1.write(arg_2, uint(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm
index 708e239..9b76cd8 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 44
+; Bound: 46
; Schema: 0
OpCapability Shader
OpCapability Image1D
@@ -45,41 +45,43 @@
%_ptr_Function_int = OpTypePointer Function %int
%21 = OpConstantNull %int
%v4uint = OpTypeVector %uint 4
- %23 = OpConstantNull %v4uint
+ %uint_1 = OpConstant %uint 1
+ %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
- %30 = OpTypeFunction %v4float
+ %27 = OpConstantNull %v4uint
+ %32 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_fb9a8f = OpFunction %void None %13
%16 = OpLabel
%arg_1 = OpVariable %_ptr_Function_int Function %21
- %arg_2 = OpVariable %_ptr_Function_v4uint Function %23
+ %arg_2 = OpVariable %_ptr_Function_v4uint Function %27
OpStore %arg_1 %int_1
- OpStore %arg_2 %23
- %27 = OpLoad %11 %arg_0
- %28 = OpLoad %int %arg_1
- %29 = OpLoad %v4uint %arg_2
- OpImageWrite %27 %28 %29
+ OpStore %arg_2 %24
+ %29 = OpLoad %11 %arg_0
+ %30 = OpLoad %int %arg_1
+ %31 = OpLoad %v4uint %arg_2
+ OpImageWrite %29 %30 %31
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
- %32 = OpLabel
- %33 = OpFunctionCall %void %textureStore_fb9a8f
+%vertex_main_inner = OpFunction %v4float None %32
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %textureStore_fb9a8f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %35 = OpLabel
- %36 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %36
+ %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
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_fb9a8f
+ %41 = OpLabel
+ %42 = OpFunctionCall %void %textureStore_fb9a8f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_fb9a8f
+ %44 = OpLabel
+ %45 = OpFunctionCall %void %textureStore_fb9a8f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl
index aaeb8f9..35389e1 100644
--- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl
@@ -2,7 +2,7 @@
fn textureStore_fb9a8f() {
var arg_1 = 1i;
- var arg_2 = vec4<u32>();
+ var arg_2 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl
index b3a551b..6ef2bed 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba8sint, write>, coords: vec2<i32>, array_index: i32, value: vec4<i32>)
fn textureStore_fbf53f() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl
index 46a154d..b90466e 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_fbf53f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl
index 46a154d..b90466e 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<int4> arg_0 : register(u0, space1);
void textureStore_fbf53f() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
int arg_2 = 1;
- int4 arg_3 = (0).xxxx;
+ int4 arg_3 = (1).xxxx;
arg_0[int3(arg_1, arg_2)] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl
index c36d495..7e5516f 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_fbf53f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_fbf53f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
void textureStore_fbf53f() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
int arg_2 = 1;
- ivec4 arg_3 = ivec4(0);
+ ivec4 arg_3 = ivec4(1);
imageStore(arg_0, ivec3(arg_1, arg_2), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl
index 7d00e81..9a5b5d0 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_fbf53f(texture2d_array<int, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
int arg_2 = 1;
- int4 arg_3 = int4(0);
+ int4 arg_3 = int4(1);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm
index 037b3ee..a1a0556 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 52
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -41,54 +41,56 @@
%void = OpTypeVoid
%13 = OpTypeFunction %void
%v2int = OpTypeVector %int 2
- %18 = OpConstantNull %v2int
-%_ptr_Function_v2int = OpTypePointer Function %v2int
%int_1 = OpConstant %int 1
+ %19 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %22 = OpConstantNull %v2int
%_ptr_Function_int = OpTypePointer Function %int
- %24 = OpConstantNull %int
+ %25 = OpConstantNull %int
%v4int = OpTypeVector %int 4
- %26 = OpConstantNull %v4int
+ %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
%_ptr_Function_v4int = OpTypePointer Function %v4int
+ %30 = OpConstantNull %v4int
%v3int = OpTypeVector %int 3
- %38 = OpTypeFunction %v4float
+ %40 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_fbf53f = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %18
- %arg_2 = OpVariable %_ptr_Function_int Function %24
- %arg_3 = OpVariable %_ptr_Function_v4int Function %26
- OpStore %arg_1 %18
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %22
+ %arg_2 = OpVariable %_ptr_Function_int Function %25
+ %arg_3 = OpVariable %_ptr_Function_v4int Function %30
+ OpStore %arg_1 %19
OpStore %arg_2 %int_1
- OpStore %arg_3 %26
- %30 = OpLoad %11 %arg_0
- %32 = OpLoad %v2int %arg_1
- %33 = OpCompositeExtract %int %32 0
- %34 = OpCompositeExtract %int %32 1
- %35 = OpLoad %int %arg_2
- %36 = OpCompositeConstruct %v3int %33 %34 %35
- %37 = OpLoad %v4int %arg_3
- OpImageWrite %30 %36 %37
+ OpStore %arg_3 %27
+ %32 = OpLoad %11 %arg_0
+ %34 = OpLoad %v2int %arg_1
+ %35 = OpCompositeExtract %int %34 0
+ %36 = OpCompositeExtract %int %34 1
+ %37 = OpLoad %int %arg_2
+ %38 = OpCompositeConstruct %v3int %35 %36 %37
+ %39 = OpLoad %v4int %arg_3
+ OpImageWrite %32 %38 %39
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %38
- %40 = OpLabel
- %41 = OpFunctionCall %void %textureStore_fbf53f
+%vertex_main_inner = OpFunction %v4float None %40
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_fbf53f
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %43 = OpLabel
- %44 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %44
+ %45 = OpLabel
+ %46 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %46
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %47 = OpLabel
- %48 = OpFunctionCall %void %textureStore_fbf53f
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %textureStore_fbf53f
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %50 = OpLabel
- %51 = OpFunctionCall %void %textureStore_fbf53f
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_fbf53f
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl
index e9c201c..3b54b98 100644
--- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
fn textureStore_fbf53f() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1i;
- var arg_3 = vec4<i32>();
+ var arg_3 = vec4<i32>(1i);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
index 808c43b..775b39a 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl
@@ -24,8 +24,8 @@
// fn textureStore(texture: texture_storage_3d<rg32float, write>, coords: vec3<u32>, value: vec4<f32>)
fn textureStore_fcbe66() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
index 2f4a6da..ed3218d 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_fcbe66() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
index 2f4a6da..ed3218d 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl
@@ -1,8 +1,8 @@
RWTexture3D<float4> arg_0 : register(u0, space1);
void textureStore_fcbe66() {
- uint3 arg_1 = (0u).xxx;
- float4 arg_2 = (0.0f).xxxx;
+ uint3 arg_1 = (1u).xxx;
+ float4 arg_2 = (1.0f).xxxx;
arg_0[arg_1] = arg_2;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
index e370bf5..036ba38 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl
@@ -2,8 +2,8 @@
using namespace metal;
void textureStore_fcbe66(texture3d<float, access::write> tint_symbol_1) {
- uint3 arg_1 = uint3(0u);
- float4 arg_2 = float4(0.0f);
+ uint3 arg_1 = uint3(1u);
+ float4 arg_2 = float4(1.0f);
tint_symbol_1.write(arg_2, uint3(arg_1));
}
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
index e40ac5d..250f4de 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.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
OpCapability StorageImageExtendedFormats
@@ -41,42 +41,45 @@
%12 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
- %18 = OpConstantNull %v3uint
+ %uint_1 = OpConstant %uint 1
+ %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
-%_ptr_Function_v4float = OpTypePointer Function %v4float
- %27 = OpTypeFunction %v4float
+ %22 = OpConstantNull %v3uint
%float_1 = OpConstant %float 1
+ %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+ %31 = OpTypeFunction %v4float
%textureStore_fcbe66 = OpFunction %void None %12
%15 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v3uint Function %18
+ %arg_1 = OpVariable %_ptr_Function_v3uint Function %22
%arg_2 = OpVariable %_ptr_Function_v4float Function %5
- OpStore %arg_1 %18
- OpStore %arg_2 %5
- %24 = OpLoad %11 %arg_0
- %25 = OpLoad %v3uint %arg_1
- %26 = OpLoad %v4float %arg_2
- OpImageWrite %24 %25 %26
+ OpStore %arg_1 %19
+ OpStore %arg_2 %24
+ %28 = OpLoad %11 %arg_0
+ %29 = OpLoad %v3uint %arg_1
+ %30 = OpLoad %v4float %arg_2
+ OpImageWrite %28 %29 %30
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
- %29 = OpLabel
- %30 = OpFunctionCall %void %textureStore_fcbe66
+%vertex_main_inner = OpFunction %v4float None %31
+ %33 = OpLabel
+ %34 = OpFunctionCall %void %textureStore_fcbe66
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 %textureStore_fcbe66
+ %39 = OpLabel
+ %40 = OpFunctionCall %void %textureStore_fcbe66
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
- %39 = OpLabel
- %40 = OpFunctionCall %void %textureStore_fcbe66
+ %42 = OpLabel
+ %43 = OpFunctionCall %void %textureStore_fcbe66
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
index 8401058..580017e 100644
--- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl
@@ -1,8 +1,8 @@
@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
fn textureStore_fcbe66() {
- var arg_1 = vec3<u32>();
- var arg_2 = vec4<f32>();
+ var arg_1 = vec3<u32>(1u);
+ var arg_2 = vec4<f32>(1.0f);
textureStore(arg_0, arg_1, arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl
index 9126e10..8c61c4e 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl
@@ -24,9 +24,9 @@
// fn textureStore(texture: texture_storage_2d_array<rgba16uint, write>, coords: vec2<i32>, array_index: u32, value: vec4<u32>)
fn textureStore_fd350c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl
index d932e87..fb441fd 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_fd350c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl
index d932e87..fb441fd 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl
@@ -1,9 +1,9 @@
RWTexture2DArray<uint4> arg_0 : register(u0, space1);
void textureStore_fd350c() {
- int2 arg_1 = (0).xx;
+ int2 arg_1 = (1).xx;
uint arg_2 = 1u;
- uint4 arg_3 = (0u).xxxx;
+ uint4 arg_3 = (1u).xxxx;
arg_0[int3(arg_1, int(arg_2))] = arg_3;
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl
index 6b1fe61..aa4132a 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl
@@ -2,9 +2,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_fd350c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -26,9 +26,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_fd350c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
@@ -44,9 +44,9 @@
layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
void textureStore_fd350c() {
- ivec2 arg_1 = ivec2(0);
+ ivec2 arg_1 = ivec2(1);
uint arg_2 = 1u;
- uvec4 arg_3 = uvec4(0u);
+ uvec4 arg_3 = uvec4(1u);
imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl
index a35e4c8..242dda3 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl
@@ -2,9 +2,9 @@
using namespace metal;
void textureStore_fd350c(texture2d_array<uint, access::write> tint_symbol_1) {
- int2 arg_1 = int2(0);
+ int2 arg_1 = int2(1);
uint arg_2 = 1u;
- uint4 arg_3 = uint4(0u);
+ uint4 arg_3 = uint4(1u);
tint_symbol_1.write(arg_3, uint2(arg_1), arg_2);
}
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm
index 1dcd751..054cd16 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -42,55 +42,58 @@
%13 = OpTypeFunction %void
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
- %19 = OpConstantNull %v2int
+ %int_1 = OpConstant %int 1
+ %20 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v2int = OpTypePointer Function %v2int
+ %23 = OpConstantNull %v2int
%uint_1 = OpConstant %uint 1
%_ptr_Function_uint = OpTypePointer Function %uint
- %25 = OpConstantNull %uint
+ %27 = OpConstantNull %uint
%v4uint = OpTypeVector %uint 4
- %27 = OpConstantNull %v4uint
+ %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+ %32 = OpConstantNull %v4uint
%v3int = OpTypeVector %int 3
- %40 = OpTypeFunction %v4float
+ %43 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureStore_fd350c = OpFunction %void None %13
%16 = OpLabel
- %arg_1 = OpVariable %_ptr_Function_v2int Function %19
- %arg_2 = OpVariable %_ptr_Function_uint Function %25
- %arg_3 = OpVariable %_ptr_Function_v4uint Function %27
- OpStore %arg_1 %19
+ %arg_1 = OpVariable %_ptr_Function_v2int Function %23
+ %arg_2 = OpVariable %_ptr_Function_uint Function %27
+ %arg_3 = OpVariable %_ptr_Function_v4uint Function %32
+ OpStore %arg_1 %20
OpStore %arg_2 %uint_1
- OpStore %arg_3 %27
- %31 = OpLoad %11 %arg_0
- %33 = OpLoad %v2int %arg_1
- %34 = OpCompositeExtract %int %33 0
- %35 = OpCompositeExtract %int %33 1
- %37 = OpLoad %uint %arg_2
- %36 = OpBitcast %int %37
- %38 = OpCompositeConstruct %v3int %34 %35 %36
- %39 = OpLoad %v4uint %arg_3
- OpImageWrite %31 %38 %39
+ OpStore %arg_3 %29
+ %34 = OpLoad %11 %arg_0
+ %36 = OpLoad %v2int %arg_1
+ %37 = OpCompositeExtract %int %36 0
+ %38 = OpCompositeExtract %int %36 1
+ %40 = OpLoad %uint %arg_2
+ %39 = OpBitcast %int %40
+ %41 = OpCompositeConstruct %v3int %37 %38 %39
+ %42 = OpLoad %v4uint %arg_3
+ OpImageWrite %34 %41 %42
OpReturn
OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %40
- %42 = OpLabel
- %43 = OpFunctionCall %void %textureStore_fd350c
+%vertex_main_inner = OpFunction %v4float None %43
+ %45 = OpLabel
+ %46 = OpFunctionCall %void %textureStore_fd350c
OpReturnValue %5
OpFunctionEnd
%vertex_main = OpFunction %void None %13
- %45 = OpLabel
- %46 = OpFunctionCall %v4float %vertex_main_inner
- OpStore %value %46
+ %48 = OpLabel
+ %49 = OpFunctionCall %v4float %vertex_main_inner
+ OpStore %value %49
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
- %49 = OpLabel
- %50 = OpFunctionCall %void %textureStore_fd350c
+ %52 = OpLabel
+ %53 = OpFunctionCall %void %textureStore_fd350c
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
- %52 = OpLabel
- %53 = OpFunctionCall %void %textureStore_fd350c
+ %55 = OpLabel
+ %56 = OpFunctionCall %void %textureStore_fd350c
OpReturn
OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl
index 6e3a293..1a03bcc 100644
--- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl
+++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl
@@ -1,9 +1,9 @@
@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
fn textureStore_fd350c() {
- var arg_1 = vec2<i32>();
+ var arg_1 = vec2<i32>(1i);
var arg_2 = 1u;
- var arg_3 = vec4<u32>();
+ var arg_3 = vec4<u32>(1u);
textureStore(arg_0, arg_1, arg_2, arg_3);
}