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>
This commit is contained in:
Ben Clayton 2022-11-04 17:06:03 +00:00 committed by Dawn LUCI CQ
parent be35dec1c6
commit 4b60615eae
5437 changed files with 24929 additions and 23283 deletions

View File

@ -276,11 +276,11 @@ enable f16;
{{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} {{- else if eq $ty.Target.Name "fa" -}}{{$float_value}}
{{- else if eq $ty.Target.Name "ia" -}}{{$value}} {{- else if eq $ty.Target.Name "ia" -}}{{$value}}
{{- else if eq $ty.Target.Name "bool" -}}true {{- else if eq $ty.Target.Name "bool" -}}true
{{- else if eq $ty.Target.Name "vec" -}} {{- else if HasPrefix $ty.Target.Name "vec" -}}
{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} {{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }}
{{- template "Type" $ty}}({{$el}}) {{- template "Type" $ty}}({{$el}})
{{- else if eq $ty.Target.Name "mat" -}}{{template "Type" $ty}}( {{- else if HasPrefix $ty.Target.Name "mat" -}}{{template "Type" $ty}}(
{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} {{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }}
{{- range $col := Iterate (index $ty.TemplateArguments 0) }} {{- range $col := Iterate (index $ty.TemplateArguments 0) }}
{{- range $row := Iterate (index $ty.TemplateArguments 1) }} {{- range $row := Iterate (index $ty.TemplateArguments 1) }}
{{- if or $col $row -}}, {{end}}{{$el}} {{- if or $col $row -}}, {{end}}{{$el}}
@ -298,11 +298,20 @@ enable f16;
{{- if IsType .Target -}} {{- if IsType .Target -}}
{{- if DeepestElementType . | IsAbstract -}} {{- if DeepestElementType . | IsAbstract -}}
{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}} {{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}
{{- else if eq .Target.Name "vec2" -}}vec2
{{- else if eq .Target.Name "vec3" -}}vec3
{{- else if eq .Target.Name "vec4" -}}vec4
{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}} {{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}
{{- else if HasPrefix .Target.Name "mat" -}}mat{{.Target.Name}}
{{- else -}} {{- else -}}
{{- end -}} {{- end -}}
{{- /* note: intrinsics.def has different type definitions for 'vec<N: num, T>',
'vec2<T>', 'vec3<T>'. Because of this we need to check whether the type
name is exactly 'vec' and 'mat' and if not, then look for the prefix. */ -}}
{{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" (ElementType .)}}> {{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" (ElementType .)}}>
{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}> {{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}>
{{- else if HasPrefix .Target.Name "vec" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}>
{{- else if HasPrefix .Target.Name "mat" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}>
{{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} {{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}}
{{- end -}} {{- end -}}
{{- else if IsEnumEntry .Target -}}{{.Target.Name}} {{- else if IsEnumEntry .Target -}}{{.Target.Name}}

View File

@ -23,7 +23,7 @@
// fn cross(vec3<f32>, vec3<f32>) -> vec3<f32> // fn cross(vec3<f32>, vec3<f32>) -> vec3<f32>
fn cross_041cb0() { fn cross_041cb0() {
var res: vec3<f32> = cross(vec3<f32>(), vec3<f32>()); var res: vec3<f32> = cross(vec3<f32>(1.f), vec3<f32>(1.f));
} }
@vertex @vertex

View File

@ -1,5 +1,5 @@
void cross_041cb0() { void cross_041cb0() {
float3 res = cross((0.0f).xxx, (0.0f).xxx); float3 res = cross((1.0f).xxx, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,5 +1,5 @@
void cross_041cb0() { void cross_041cb0() {
float3 res = cross((0.0f).xxx, (0.0f).xxx); float3 res = cross((1.0f).xxx, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void cross_041cb0() { void cross_041cb0() {
vec3 res = cross(vec3(0.0f), vec3(0.0f)); vec3 res = cross(vec3(1.0f), vec3(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void cross_041cb0() { void cross_041cb0() {
vec3 res = cross(vec3(0.0f), vec3(0.0f)); vec3 res = cross(vec3(1.0f), vec3(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void cross_041cb0() { void cross_041cb0() {
vec3 res = cross(vec3(0.0f), vec3(0.0f)); vec3 res = cross(vec3(1.0f), vec3(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void cross_041cb0() { void cross_041cb0() {
float3 res = cross(float3(0.0f), float3(0.0f)); float3 res = cross(float3(1.0f), float3(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 33 ; Bound: 34
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%15 = OpExtInstImport "GLSL.std.450" %15 = OpExtInstImport "GLSL.std.450"
@ -32,36 +32,37 @@
%void = OpTypeVoid %void = OpTypeVoid
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%16 = OpConstantNull %v3float
%_ptr_Function_v3float = OpTypePointer Function %v3float
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%17 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%_ptr_Function_v3float = OpTypePointer Function %v3float
%20 = OpConstantNull %v3float
%21 = OpTypeFunction %v4float
%cross_041cb0 = OpFunction %void None %9 %cross_041cb0 = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_v3float Function %16 %res = OpVariable %_ptr_Function_v3float Function %20
%13 = OpExtInst %v3float %15 Cross %16 %16 %13 = OpExtInst %v3float %15 Cross %17 %17
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19 %vertex_main_inner = OpFunction %v4float None %21
%21 = OpLabel %23 = OpLabel
%22 = OpFunctionCall %void %cross_041cb0 %24 = OpFunctionCall %void %cross_041cb0
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%24 = OpLabel %26 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner %27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25 OpStore %value %27
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %9 %fragment_main = OpFunction %void None %9
%28 = OpLabel %29 = OpLabel
%29 = OpFunctionCall %void %cross_041cb0 %30 = OpFunctionCall %void %cross_041cb0
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %9 %compute_main = OpFunction %void None %9
%31 = OpLabel %32 = OpLabel
%32 = OpFunctionCall %void %cross_041cb0 %33 = OpFunctionCall %void %cross_041cb0
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn cross_041cb0() { fn cross_041cb0() {
var res : vec3<f32> = cross(vec3<f32>(), vec3<f32>()); var res : vec3<f32> = cross(vec3<f32>(1.0f), vec3<f32>(1.0f));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@ enable f16;
// fn cross(vec3<f16>, vec3<f16>) -> vec3<f16> // fn cross(vec3<f16>, vec3<f16>) -> vec3<f16>
fn cross_9857cb() { fn cross_9857cb() {
var res: vec3<f16> = cross(vec3<f16>(), vec3<f16>()); var res: vec3<f16> = cross(vec3<f16>(f16()), vec3<f16>(f16()));
} }
@vertex @vertex

View File

@ -1,7 +1,7 @@
enable f16; enable f16;
fn cross_9857cb() { fn cross_9857cb() {
var res : vec3<f16> = cross(vec3<f16>(), vec3<f16>()); var res : vec3<f16> = cross(vec3<f16>(f16()), vec3<f16>(f16()));
} }
@vertex @vertex

View File

@ -23,7 +23,7 @@
// fn pack2x16float(vec2<f32>) -> u32 // fn pack2x16float(vec2<f32>) -> u32
fn pack2x16float_0e97b3() { fn pack2x16float_0e97b3() {
var res: u32 = pack2x16float(vec2<f32>()); var res: u32 = pack2x16float(vec2<f32>(1.f));
} }
@vertex @vertex

View File

@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) {
} }
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = tint_pack2x16float((0.0f).xx); uint res = tint_pack2x16float((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) {
} }
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = tint_pack2x16float((0.0f).xx); uint res = tint_pack2x16float((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = packHalf2x16(vec2(0.0f)); uint res = packHalf2x16(vec2(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = packHalf2x16(vec2(0.0f)); uint res = packHalf2x16(vec2(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = packHalf2x16(vec2(0.0f)); uint res = packHalf2x16(vec2(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void pack2x16float_0e97b3() { void pack2x16float_0e97b3() {
uint res = as_type<uint>(half2(float2(0.0f))); uint res = as_type<uint>(half2(float2(1.0f)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -33,27 +33,27 @@
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%17 = OpConstantNull %v2float
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%21 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%18 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%22 = OpTypeFunction %v4float
%pack2x16float_0e97b3 = OpFunction %void None %9 %pack2x16float_0e97b3 = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %20 %res = OpVariable %_ptr_Function_uint Function %21
%13 = OpExtInst %uint %15 PackHalf2x16 %17 %13 = OpExtInst %uint %15 PackHalf2x16 %18
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21 %vertex_main_inner = OpFunction %v4float None %22
%23 = OpLabel %24 = OpLabel
%24 = OpFunctionCall %void %pack2x16float_0e97b3 %25 = OpFunctionCall %void %pack2x16float_0e97b3
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%26 = OpLabel %27 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner %28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27 OpStore %value %28
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn pack2x16float_0e97b3() { fn pack2x16float_0e97b3() {
var res : u32 = pack2x16float(vec2<f32>()); var res : u32 = pack2x16float(vec2<f32>(1.0f));
} }
@vertex @vertex

View File

@ -23,7 +23,7 @@
// fn pack2x16snorm(vec2<f32>) -> u32 // fn pack2x16snorm(vec2<f32>) -> u32
fn pack2x16snorm_6c169b() { fn pack2x16snorm_6c169b() {
var res: u32 = pack2x16snorm(vec2<f32>()); var res: u32 = pack2x16snorm(vec2<f32>(1.f));
} }
@vertex @vertex

View File

@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) {
} }
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = tint_pack2x16snorm((0.0f).xx); uint res = tint_pack2x16snorm((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) {
} }
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = tint_pack2x16snorm((0.0f).xx); uint res = tint_pack2x16snorm((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = packSnorm2x16(vec2(0.0f)); uint res = packSnorm2x16(vec2(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = packSnorm2x16(vec2(0.0f)); uint res = packSnorm2x16(vec2(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = packSnorm2x16(vec2(0.0f)); uint res = packSnorm2x16(vec2(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void pack2x16snorm_6c169b() { void pack2x16snorm_6c169b() {
uint res = pack_float_to_snorm2x16(float2(0.0f)); uint res = pack_float_to_snorm2x16(float2(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -33,27 +33,27 @@
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%17 = OpConstantNull %v2float
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%21 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%18 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%22 = OpTypeFunction %v4float
%pack2x16snorm_6c169b = OpFunction %void None %9 %pack2x16snorm_6c169b = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %20 %res = OpVariable %_ptr_Function_uint Function %21
%13 = OpExtInst %uint %15 PackSnorm2x16 %17 %13 = OpExtInst %uint %15 PackSnorm2x16 %18
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21 %vertex_main_inner = OpFunction %v4float None %22
%23 = OpLabel %24 = OpLabel
%24 = OpFunctionCall %void %pack2x16snorm_6c169b %25 = OpFunctionCall %void %pack2x16snorm_6c169b
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%26 = OpLabel %27 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner %28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27 OpStore %value %28
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn pack2x16snorm_6c169b() { fn pack2x16snorm_6c169b() {
var res : u32 = pack2x16snorm(vec2<f32>()); var res : u32 = pack2x16snorm(vec2<f32>(1.0f));
} }
@vertex @vertex

View File

@ -23,7 +23,7 @@
// fn pack2x16unorm(vec2<f32>) -> u32 // fn pack2x16unorm(vec2<f32>) -> u32
fn pack2x16unorm_0f08e4() { fn pack2x16unorm_0f08e4() {
var res: u32 = pack2x16unorm(vec2<f32>()); var res: u32 = pack2x16unorm(vec2<f32>(1.f));
} }
@vertex @vertex

View File

@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) {
} }
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = tint_pack2x16unorm((0.0f).xx); uint res = tint_pack2x16unorm((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) {
} }
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = tint_pack2x16unorm((0.0f).xx); uint res = tint_pack2x16unorm((1.0f).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = packUnorm2x16(vec2(0.0f)); uint res = packUnorm2x16(vec2(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = packUnorm2x16(vec2(0.0f)); uint res = packUnorm2x16(vec2(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = packUnorm2x16(vec2(0.0f)); uint res = packUnorm2x16(vec2(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void pack2x16unorm_0f08e4() { void pack2x16unorm_0f08e4() {
uint res = pack_float_to_unorm2x16(float2(0.0f)); uint res = pack_float_to_unorm2x16(float2(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -33,27 +33,27 @@
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%17 = OpConstantNull %v2float
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%21 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%18 = OpConstantComposite %v2float %float_1 %float_1
%_ptr_Function_uint = OpTypePointer Function %uint
%21 = OpConstantNull %uint
%22 = OpTypeFunction %v4float
%pack2x16unorm_0f08e4 = OpFunction %void None %9 %pack2x16unorm_0f08e4 = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %20 %res = OpVariable %_ptr_Function_uint Function %21
%13 = OpExtInst %uint %15 PackUnorm2x16 %17 %13 = OpExtInst %uint %15 PackUnorm2x16 %18
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %21 %vertex_main_inner = OpFunction %v4float None %22
%23 = OpLabel %24 = OpLabel
%24 = OpFunctionCall %void %pack2x16unorm_0f08e4 %25 = OpFunctionCall %void %pack2x16unorm_0f08e4
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%26 = OpLabel %27 = OpLabel
%27 = OpFunctionCall %v4float %vertex_main_inner %28 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %27 OpStore %value %28
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn pack2x16unorm_0f08e4() { fn pack2x16unorm_0f08e4() {
var res : u32 = pack2x16unorm(vec2<f32>()); var res : u32 = pack2x16unorm(vec2<f32>(1.0f));
} }
@vertex @vertex

View File

@ -23,7 +23,7 @@
// fn pack4x8snorm(vec4<f32>) -> u32 // fn pack4x8snorm(vec4<f32>) -> u32
fn pack4x8snorm_4d22e7() { fn pack4x8snorm_4d22e7() {
var res: u32 = pack4x8snorm(vec4<f32>()); var res: u32 = pack4x8snorm(vec4<f32>(1.f));
} }
@vertex @vertex

View File

@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) {
} }
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = tint_pack4x8snorm((0.0f).xxxx); uint res = tint_pack4x8snorm((1.0f).xxxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) {
} }
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = tint_pack4x8snorm((0.0f).xxxx); uint res = tint_pack4x8snorm((1.0f).xxxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = packSnorm4x8(vec4(0.0f)); uint res = packSnorm4x8(vec4(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = packSnorm4x8(vec4(0.0f)); uint res = packSnorm4x8(vec4(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = packSnorm4x8(vec4(0.0f)); uint res = packSnorm4x8(vec4(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void pack4x8snorm_4d22e7() { void pack4x8snorm_4d22e7() {
uint res = pack_float_to_snorm4x8(float4(0.0f)); uint res = pack_float_to_snorm4x8(float4(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 33 ; Bound: 34
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%15 = OpExtInstImport "GLSL.std.450" %15 = OpExtInstImport "GLSL.std.450"
@ -32,36 +32,37 @@
%void = OpTypeVoid %void = OpTypeVoid
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%18 = OpConstantNull %uint
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%21 = OpTypeFunction %v4float
%pack4x8snorm_4d22e7 = OpFunction %void None %9 %pack4x8snorm_4d22e7 = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %18 %res = OpVariable %_ptr_Function_uint Function %20
%13 = OpExtInst %uint %15 PackSnorm4x8 %5 %13 = OpExtInst %uint %15 PackSnorm4x8 %17
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19 %vertex_main_inner = OpFunction %v4float None %21
%21 = OpLabel %23 = OpLabel
%22 = OpFunctionCall %void %pack4x8snorm_4d22e7 %24 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%24 = OpLabel %26 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner %27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25 OpStore %value %27
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %9 %fragment_main = OpFunction %void None %9
%28 = OpLabel %29 = OpLabel
%29 = OpFunctionCall %void %pack4x8snorm_4d22e7 %30 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %9 %compute_main = OpFunction %void None %9
%31 = OpLabel %32 = OpLabel
%32 = OpFunctionCall %void %pack4x8snorm_4d22e7 %33 = OpFunctionCall %void %pack4x8snorm_4d22e7
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn pack4x8snorm_4d22e7() { fn pack4x8snorm_4d22e7() {
var res : u32 = pack4x8snorm(vec4<f32>()); var res : u32 = pack4x8snorm(vec4<f32>(1.0f));
} }
@vertex @vertex

View File

@ -23,7 +23,7 @@
// fn pack4x8unorm(vec4<f32>) -> u32 // fn pack4x8unorm(vec4<f32>) -> u32
fn pack4x8unorm_95c456() { fn pack4x8unorm_95c456() {
var res: u32 = pack4x8unorm(vec4<f32>()); var res: u32 = pack4x8unorm(vec4<f32>(1.f));
} }
@vertex @vertex

View File

@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) {
} }
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = tint_pack4x8unorm((0.0f).xxxx); uint res = tint_pack4x8unorm((1.0f).xxxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) {
} }
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = tint_pack4x8unorm((0.0f).xxxx); uint res = tint_pack4x8unorm((1.0f).xxxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
#version 310 es #version 310 es
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = packUnorm4x8(vec4(0.0f)); uint res = packUnorm4x8(vec4(1.0f));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -21,7 +21,7 @@ void main() {
precision mediump float; precision mediump float;
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = packUnorm4x8(vec4(0.0f)); uint res = packUnorm4x8(vec4(1.0f));
} }
void fragment_main() { void fragment_main() {
@ -35,7 +35,7 @@ void main() {
#version 310 es #version 310 es
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = packUnorm4x8(vec4(0.0f)); uint res = packUnorm4x8(vec4(1.0f));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void pack4x8unorm_95c456() { void pack4x8unorm_95c456() {
uint res = pack_float_to_unorm4x8(float4(0.0f)); uint res = pack_float_to_unorm4x8(float4(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 33 ; Bound: 34
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
%15 = OpExtInstImport "GLSL.std.450" %15 = OpExtInstImport "GLSL.std.450"
@ -32,36 +32,37 @@
%void = OpTypeVoid %void = OpTypeVoid
%9 = OpTypeFunction %void %9 = OpTypeFunction %void
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%18 = OpConstantNull %uint
%19 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1 %float_1 = OpConstant %float 1
%17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%_ptr_Function_uint = OpTypePointer Function %uint
%20 = OpConstantNull %uint
%21 = OpTypeFunction %v4float
%pack4x8unorm_95c456 = OpFunction %void None %9 %pack4x8unorm_95c456 = OpFunction %void None %9
%12 = OpLabel %12 = OpLabel
%res = OpVariable %_ptr_Function_uint Function %18 %res = OpVariable %_ptr_Function_uint Function %20
%13 = OpExtInst %uint %15 PackUnorm4x8 %5 %13 = OpExtInst %uint %15 PackUnorm4x8 %17
OpStore %res %13 OpStore %res %13
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %19 %vertex_main_inner = OpFunction %v4float None %21
%21 = OpLabel %23 = OpLabel
%22 = OpFunctionCall %void %pack4x8unorm_95c456 %24 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %9 %vertex_main = OpFunction %void None %9
%24 = OpLabel %26 = OpLabel
%25 = OpFunctionCall %v4float %vertex_main_inner %27 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %25 OpStore %value %27
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %9 %fragment_main = OpFunction %void None %9
%28 = OpLabel %29 = OpLabel
%29 = OpFunctionCall %void %pack4x8unorm_95c456 %30 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %9 %compute_main = OpFunction %void None %9
%31 = OpLabel %32 = OpLabel
%32 = OpFunctionCall %void %pack4x8unorm_95c456 %33 = OpFunctionCall %void %pack4x8unorm_95c456
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -1,5 +1,5 @@
fn pack4x8unorm_95c456() { fn pack4x8unorm_95c456() {
var res : u32 = pack4x8unorm(vec4<f32>()); var res : u32 = pack4x8unorm(vec4<f32>(1.0f));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32> // fn textureGather(@const component: u32, texture: texture_cube<i32>, sampler: sampler, coords: vec3<f32>) -> vec4<i32>
fn textureGather_0166ec() { fn textureGather_0166ec() {
var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f));
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ TextureCube<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_0166ec() { void textureGather_0166ec() {
int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ TextureCube<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_0166ec() { void textureGather_0166ec() {
int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp isamplerCube arg_1_arg_2; uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() { void textureGather_0166ec() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp isamplerCube arg_1_arg_2; uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() { void textureGather_0166ec() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp isamplerCube arg_1_arg_2; uniform highp isamplerCube arg_1_arg_2;
void textureGather_0166ec() { void textureGather_0166ec() {
ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_0166ec(texturecube<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -46,32 +46,32 @@
%v4int = OpTypeVector %int 4 %v4int = OpTypeVector %int 4
%24 = OpTypeSampledImage %11 %24 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%27 = OpConstantNull %v3float %float_1 = OpConstant %float 1
%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Function_v4int = OpTypePointer Function %v4int
%32 = OpConstantNull %v4int %33 = OpConstantNull %v4int
%33 = OpTypeFunction %v4float %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_0166ec = OpFunction %void None %16 %textureGather_0166ec = OpFunction %void None %16
%19 = OpLabel %19 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %32 %res = OpVariable %_ptr_Function_v4int Function %33
%22 = OpLoad %15 %arg_2 %22 = OpLoad %15 %arg_2
%23 = OpLoad %11 %arg_1 %23 = OpLoad %11 %arg_1
%25 = OpSampledImage %24 %23 %22 %25 = OpSampledImage %24 %23 %22
%20 = OpImageGather %v4int %25 %27 %uint_1 %20 = OpImageGather %v4int %25 %28 %uint_1
OpStore %res %20 OpStore %res %20
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %33 %vertex_main_inner = OpFunction %v4float None %34
%35 = OpLabel %36 = OpLabel
%36 = OpFunctionCall %void %textureGather_0166ec %37 = OpFunctionCall %void %textureGather_0166ec
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %16 %vertex_main = OpFunction %void None %16
%38 = OpLabel %39 = OpLabel
%39 = OpFunctionCall %v4float %vertex_main_inner %40 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %39 OpStore %value %40
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_0166ec() { fn textureGather_0166ec() {
var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32> // fn textureGather(@const component: u32, texture: texture_cube_array<i32>, sampler: sampler, coords: vec3<f32>, array_index: u32) -> vec4<i32>
fn textureGather_04fa78() { fn textureGather_04fa78() {
var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); var res: vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f), 1u);
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ TextureCubeArray<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_04fa78() { void textureGather_04fa78() {
int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ TextureCubeArray<int4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_04fa78() { void textureGather_04fa78() {
int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_04fa78(texturecube_array<int, access::sample> tint_symbol_1, sampler tint_symbol_2) {
int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 48 ; Bound: 52
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpCapability SampledCubeArray OpCapability SampledCubeArray
@ -46,44 +46,48 @@
%16 = OpTypeFunction %void %16 = OpTypeFunction %void
%v4int = OpTypeVector %int 4 %v4int = OpTypeVector %int 4
%24 = OpTypeSampledImage %11 %24 = OpTypeSampledImage %11
%float_0 = OpConstant %float 0 %v3float = OpTypeVector %float 3
%float_1 = OpConstant %float 1
%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Function_v4int = OpTypePointer Function %v4int
%33 = OpConstantNull %v4int %38 = OpConstantNull %v4int
%34 = OpTypeFunction %v4float %39 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_04fa78 = OpFunction %void None %16 %textureGather_04fa78 = OpFunction %void None %16
%19 = OpLabel %19 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %33 %res = OpVariable %_ptr_Function_v4int Function %38
%22 = OpLoad %15 %arg_2 %22 = OpLoad %15 %arg_2
%23 = OpLoad %11 %arg_1 %23 = OpLoad %11 %arg_1
%25 = OpSampledImage %24 %23 %22 %25 = OpSampledImage %24 %23 %22
%27 = OpConvertUToF %float %uint_1 %29 = OpCompositeExtract %float %28 0
%30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 %30 = OpCompositeExtract %float %28 1
%20 = OpImageGather %v4int %25 %30 %uint_1 %31 = OpCompositeExtract %float %28 2
%32 = OpConvertUToF %float %uint_1
%35 = OpCompositeConstruct %v4float %29 %30 %31 %32
%20 = OpImageGather %v4int %25 %35 %uint_1
OpStore %res %20 OpStore %res %20
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34 %vertex_main_inner = OpFunction %v4float None %39
%36 = OpLabel %41 = OpLabel
%37 = OpFunctionCall %void %textureGather_04fa78 %42 = OpFunctionCall %void %textureGather_04fa78
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %16 %vertex_main = OpFunction %void None %16
%39 = OpLabel %44 = OpLabel
%40 = OpFunctionCall %v4float %vertex_main_inner %45 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %40 OpStore %value %45
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %16 %fragment_main = OpFunction %void None %16
%43 = OpLabel %47 = OpLabel
%44 = OpFunctionCall %void %textureGather_04fa78 %48 = OpFunctionCall %void %textureGather_04fa78
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %16 %compute_main = OpFunction %void None %16
%46 = OpLabel %50 = OpLabel
%47 = OpFunctionCall %void %textureGather_04fa78 %51 = OpFunctionCall %void %textureGather_04fa78
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_04fa78() { fn textureGather_04fa78() {
var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(), 1u); var res : vec4<i32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f), 1u);
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32> // fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_10c554() { fn textureGather_10c554() {
var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>()); var res: vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.f));
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1); SamplerState arg_1 : register(s1, space1);
void textureGather_10c554() { void textureGather_10c554() {
float4 res = arg_0.Gather(arg_1, (0.0f).xxx); float4 res = arg_0.Gather(arg_1, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1); SamplerState arg_1 : register(s1, space1);
void textureGather_10c554() { void textureGather_10c554() {
float4 res = arg_0.Gather(arg_1, (0.0f).xxx); float4 res = arg_0.Gather(arg_1, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp samplerCubeShadow arg_0_arg_1; uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() { void textureGather_10c554() {
vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0);
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp samplerCubeShadow arg_0_arg_1; uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() { void textureGather_10c554() {
vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0);
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp samplerCubeShadow arg_0_arg_1; uniform highp samplerCubeShadow arg_0_arg_1;
void textureGather_10c554() { void textureGather_10c554() {
vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0);
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_10c554(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_10c554(depthcube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f)); float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -44,31 +44,31 @@
%15 = OpTypeFunction %void %15 = OpTypeFunction %void
%22 = OpTypeSampledImage %11 %22 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%25 = OpConstantNull %v3float %float_1 = OpConstant %float 1
%26 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%int_0 = OpConstant %int 0 %int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float %31 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_10c554 = OpFunction %void None %15 %textureGather_10c554 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5
%20 = OpLoad %14 %arg_1 %20 = OpLoad %14 %arg_1
%21 = OpLoad %11 %arg_0 %21 = OpLoad %11 %arg_0
%23 = OpSampledImage %22 %21 %20 %23 = OpSampledImage %22 %21 %20
%19 = OpImageGather %v4float %23 %25 %int_0 %19 = OpImageGather %v4float %23 %26 %int_0
OpStore %res %19 OpStore %res %19
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30 %vertex_main_inner = OpFunction %v4float None %31
%32 = OpLabel %33 = OpLabel
%33 = OpFunctionCall %void %textureGather_10c554 %34 = OpFunctionCall %void %textureGather_10c554
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %15 %vertex_main = OpFunction %void None %15
%35 = OpLabel %36 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner %37 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36 OpStore %value %37
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler; @group(1) @binding(1) var arg_1 : sampler;
fn textureGather_10c554() { fn textureGather_10c554() {
var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>()); var res : vec4<f32> = textureGather(arg_0, arg_1, vec3<f32>(1.0f));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32> // fn textureGather(@const component: u32, texture: texture_cube<f32>, sampler: sampler, coords: vec3<f32>) -> vec4<f32>
fn textureGather_11b2db() { fn textureGather_11b2db() {
var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); var res: vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.f));
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ TextureCube<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_11b2db() { void textureGather_11b2db() {
float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ TextureCube<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_11b2db() { void textureGather_11b2db() {
float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp samplerCube arg_1_arg_2; uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() { void textureGather_11b2db() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp samplerCube arg_1_arg_2; uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() { void textureGather_11b2db() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp samplerCube arg_1_arg_2; uniform highp samplerCube arg_1_arg_2;
void textureGather_11b2db() { void textureGather_11b2db() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_11b2db(texturecube<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -44,31 +44,31 @@
%15 = OpTypeFunction %void %15 = OpTypeFunction %void
%22 = OpTypeSampledImage %11 %22 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%25 = OpConstantNull %v3float %float_1 = OpConstant %float 1
%26 = OpConstantComposite %v3float %float_1 %float_1 %float_1
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float
%30 = OpTypeFunction %v4float %31 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_11b2db = OpFunction %void None %15 %textureGather_11b2db = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5
%20 = OpLoad %14 %arg_2 %20 = OpLoad %14 %arg_2
%21 = OpLoad %11 %arg_1 %21 = OpLoad %11 %arg_1
%23 = OpSampledImage %22 %21 %20 %23 = OpSampledImage %22 %21 %20
%19 = OpImageGather %v4float %23 %25 %uint_1 %19 = OpImageGather %v4float %23 %26 %uint_1
OpStore %res %19 OpStore %res %19
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %30 %vertex_main_inner = OpFunction %v4float None %31
%32 = OpLabel %33 = OpLabel
%33 = OpFunctionCall %void %textureGather_11b2db %34 = OpFunctionCall %void %textureGather_11b2db
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %15 %vertex_main = OpFunction %void None %15
%35 = OpLabel %36 = OpLabel
%36 = OpFunctionCall %v4float %vertex_main_inner %37 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %36 OpStore %value %37
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_11b2db() { fn textureGather_11b2db() {
var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>()); var res : vec4<f32> = textureGather(1u, arg_1, arg_2, vec3<f32>(1.0f));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32> // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<f32>
fn textureGather_17baac() { fn textureGather_17baac() {
var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1u);
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_17baac() { void textureGather_17baac() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_17baac() { void textureGather_17baac() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() { void textureGather_17baac() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1);
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() { void textureGather_17baac() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1);
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_17baac() { void textureGather_17baac() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1);
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_17baac(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 48 ; Bound: 51
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -44,45 +44,48 @@
%15 = OpTypeFunction %void %15 = OpTypeFunction %void
%22 = OpTypeSampledImage %11 %22 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0 %v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%27 = OpConstantComposite %v2float %float_1 %float_1
%uint = OpTypeInt 32 0 %uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%int_1 = OpConstant %int 1 %int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float
%34 = OpTypeFunction %v4float %38 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_17baac = OpFunction %void None %15 %textureGather_17baac = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5
%20 = OpLoad %14 %arg_2 %20 = OpLoad %14 %arg_2
%21 = OpLoad %11 %arg_1 %21 = OpLoad %11 %arg_1
%23 = OpSampledImage %22 %21 %20 %23 = OpSampledImage %22 %21 %20
%26 = OpConvertUToF %float %uint_1 %28 = OpCompositeExtract %float %27 0
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 %29 = OpCompositeExtract %float %27 1
%19 = OpImageGather %v4float %23 %29 %int_1 %30 = OpConvertUToF %float %uint_1
%33 = OpCompositeConstruct %v3float %28 %29 %30
%19 = OpImageGather %v4float %23 %33 %int_1
OpStore %res %19 OpStore %res %19
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34 %vertex_main_inner = OpFunction %v4float None %38
%36 = OpLabel %40 = OpLabel
%37 = OpFunctionCall %void %textureGather_17baac %41 = OpFunctionCall %void %textureGather_17baac
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %15 %vertex_main = OpFunction %void None %15
%39 = OpLabel %43 = OpLabel
%40 = OpFunctionCall %v4float %vertex_main_inner %44 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %40 OpStore %value %44
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %15 %fragment_main = OpFunction %void None %15
%43 = OpLabel
%44 = OpFunctionCall %void %textureGather_17baac
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%46 = OpLabel %46 = OpLabel
%47 = OpFunctionCall %void %textureGather_17baac %47 = OpFunctionCall %void %textureGather_17baac
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %15
%49 = OpLabel
%50 = OpFunctionCall %void %textureGather_17baac
OpReturn
OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_17baac() { fn textureGather_17baac() {
var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1u); var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1u);
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32> // fn textureGather(@const component: u32, texture: texture_2d_array<u32>, sampler: sampler, coords: vec2<f32>, array_index: u32) -> vec4<u32>
fn textureGather_1bf0ab() { fn textureGather_1bf0ab() {
var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); var res: vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.f), 1u);
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ Texture2DArray<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_1bf0ab() { void textureGather_1bf0ab() {
uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ Texture2DArray<uint4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_1bf0ab() { void textureGather_1bf0ab() {
uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp usampler2DArray arg_1_arg_2; uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() { void textureGather_1bf0ab() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp usampler2DArray arg_1_arg_2; uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() { void textureGather_1bf0ab() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u));
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp usampler2DArray arg_1_arg_2; uniform highp usampler2DArray arg_1_arg_2;
void textureGather_1bf0ab() { void textureGather_1bf0ab() {
uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_1bf0ab(texture2d_array<uint, access::sample> tint_symbol_1, sampler tint_symbol_2) {
uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 48 ; Bound: 51
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -46,43 +46,46 @@
%v4uint = OpTypeVector %uint 4 %v4uint = OpTypeVector %uint 4
%24 = OpTypeSampledImage %11 %24 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0 %v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%29 = OpConstantComposite %v2float %float_1 %float_1
%uint_1 = OpConstant %uint 1 %uint_1 = OpConstant %uint 1
%_ptr_Function_v4uint = OpTypePointer Function %v4uint %_ptr_Function_v4uint = OpTypePointer Function %v4uint
%33 = OpConstantNull %v4uint %37 = OpConstantNull %v4uint
%34 = OpTypeFunction %v4float %38 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_1bf0ab = OpFunction %void None %16 %textureGather_1bf0ab = OpFunction %void None %16
%19 = OpLabel %19 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %33 %res = OpVariable %_ptr_Function_v4uint Function %37
%22 = OpLoad %15 %arg_2 %22 = OpLoad %15 %arg_2
%23 = OpLoad %11 %arg_1 %23 = OpLoad %11 %arg_1
%25 = OpSampledImage %24 %23 %22 %25 = OpSampledImage %24 %23 %22
%28 = OpConvertUToF %float %uint_1 %30 = OpCompositeExtract %float %29 0
%30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 %31 = OpCompositeExtract %float %29 1
%20 = OpImageGather %v4uint %25 %30 %uint_1 %32 = OpConvertUToF %float %uint_1
%34 = OpCompositeConstruct %v3float %30 %31 %32
%20 = OpImageGather %v4uint %25 %34 %uint_1
OpStore %res %20 OpStore %res %20
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %34 %vertex_main_inner = OpFunction %v4float None %38
%36 = OpLabel %40 = OpLabel
%37 = OpFunctionCall %void %textureGather_1bf0ab %41 = OpFunctionCall %void %textureGather_1bf0ab
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %16 %vertex_main = OpFunction %void None %16
%39 = OpLabel %43 = OpLabel
%40 = OpFunctionCall %v4float %vertex_main_inner %44 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %40 OpStore %value %44
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %16 %fragment_main = OpFunction %void None %16
%43 = OpLabel
%44 = OpFunctionCall %void %textureGather_1bf0ab
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %16
%46 = OpLabel %46 = OpLabel
%47 = OpFunctionCall %void %textureGather_1bf0ab %47 = OpFunctionCall %void %textureGather_1bf0ab
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %16
%49 = OpLabel
%50 = OpFunctionCall %void %textureGather_1bf0ab
OpReturn
OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_1bf0ab() { fn textureGather_1bf0ab() {
var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(), 1u); var res : vec4<u32> = textureGather(1u, arg_1, arg_2, vec2<f32>(1.0f), 1u);
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
fn textureGather_1f7f6b() { fn textureGather_1f7f6b() {
var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>()); var res: vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.f), vec2<i32>(1i));
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1); SamplerState arg_1 : register(s1, space1);
void textureGather_1f7f6b() { void textureGather_1f7f6b() {
float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1);
SamplerState arg_1 : register(s1, space1); SamplerState arg_1 : register(s1, space1);
void textureGather_1f7f6b() { void textureGather_1f7f6b() {
float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp sampler2DShadow arg_0_arg_1; uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() { void textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1));
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp sampler2DShadow arg_0_arg_1; uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() { void textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1));
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp sampler2DShadow arg_0_arg_1; uniform highp sampler2DShadow arg_0_arg_1;
void textureGather_1f7f6b() { void textureGather_1f7f6b() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1));
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_1f7f6b(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_1f7f6b(depth2d<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0)); float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 46 ; Bound: 47
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -44,43 +44,44 @@
%15 = OpTypeFunction %void %15 = OpTypeFunction %void
%22 = OpTypeSampledImage %11 %22 = OpTypeSampledImage %11
%v2float = OpTypeVector %float 2 %v2float = OpTypeVector %float 2
%25 = OpConstantNull %v2float %float_1 = OpConstant %float 1
%26 = OpConstantComposite %v2float %float_1 %float_1
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%int_0 = OpConstant %int 0 %int_0 = OpConstant %int 0
%v2int = OpTypeVector %int 2 %v2int = OpTypeVector %int 2
%29 = OpConstantNull %v2int %int_1 = OpConstant %int 1
%31 = OpConstantComposite %v2int %int_1 %int_1
%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float
%32 = OpTypeFunction %v4float %34 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_1f7f6b = OpFunction %void None %15 %textureGather_1f7f6b = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5
%20 = OpLoad %14 %arg_1 %20 = OpLoad %14 %arg_1
%21 = OpLoad %11 %arg_0 %21 = OpLoad %11 %arg_0
%23 = OpSampledImage %22 %21 %20 %23 = OpSampledImage %22 %21 %20
%19 = OpImageGather %v4float %23 %25 %int_0 ConstOffset %29 %19 = OpImageGather %v4float %23 %26 %int_0 ConstOffset %31
OpStore %res %19 OpStore %res %19
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32 %vertex_main_inner = OpFunction %v4float None %34
%34 = OpLabel %36 = OpLabel
%35 = OpFunctionCall %void %textureGather_1f7f6b %37 = OpFunctionCall %void %textureGather_1f7f6b
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %15 %vertex_main = OpFunction %void None %15
%37 = OpLabel %39 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner %40 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38 OpStore %value %40
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %15 %fragment_main = OpFunction %void None %15
%41 = OpLabel %42 = OpLabel
%42 = OpFunctionCall %void %textureGather_1f7f6b %43 = OpFunctionCall %void %textureGather_1f7f6b
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %15 %compute_main = OpFunction %void None %15
%44 = OpLabel %45 = OpLabel
%45 = OpFunctionCall %void %textureGather_1f7f6b %46 = OpFunctionCall %void %textureGather_1f7f6b
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(1) var arg_1 : sampler; @group(1) @binding(1) var arg_1 : sampler;
fn textureGather_1f7f6b() { fn textureGather_1f7f6b() {
var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(), vec2<i32>()); var res : vec4<f32> = textureGather(arg_0, arg_1, vec2<f32>(1.0f), vec2<i32>(1i));
} }
@vertex @vertex

View File

@ -25,7 +25,7 @@
// fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32> // fn textureGather(@const component: i32, texture: texture_2d_array<f32>, sampler: sampler, coords: vec2<f32>, array_index: i32) -> vec4<f32>
fn textureGather_22e930() { fn textureGather_22e930() {
var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); var res: vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.f), 1i);
} }
@vertex @vertex

View File

@ -2,7 +2,7 @@ Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_22e930() { void textureGather_22e930() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -2,7 +2,7 @@ Texture2DArray<float4> arg_1 : register(t1, space1);
SamplerState arg_2 : register(s2, space1); SamplerState arg_2 : register(s2, space1);
void textureGather_22e930() { void textureGather_22e930() {
float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)));
} }
struct tint_symbol { struct tint_symbol {

View File

@ -3,7 +3,7 @@
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() { void textureGather_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1);
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,7 +25,7 @@ precision mediump float;
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() { void textureGather_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1);
} }
void fragment_main() { void fragment_main() {
@ -41,7 +41,7 @@ void main() {
uniform highp sampler2DArray arg_1_arg_2; uniform highp sampler2DArray arg_1_arg_2;
void textureGather_22e930() { void textureGather_22e930() {
vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1);
} }
void compute_main() { void compute_main() {

View File

@ -2,7 +2,7 @@
using namespace metal; using namespace metal;
void textureGather_22e930(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) { void textureGather_22e930(texture2d_array<float, access::sample> tint_symbol_1, sampler tint_symbol_2) {
float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y);
} }
struct tint_symbol { struct tint_symbol {

View File

@ -1,7 +1,7 @@
; SPIR-V ; SPIR-V
; Version: 1.3 ; Version: 1.3
; Generator: Google Tint Compiler; 0 ; Generator: Google Tint Compiler; 0
; Bound: 46 ; Bound: 49
; Schema: 0 ; Schema: 0
OpCapability Shader OpCapability Shader
OpMemoryModel Logical GLSL450 OpMemoryModel Logical GLSL450
@ -44,43 +44,46 @@
%15 = OpTypeFunction %void %15 = OpTypeFunction %void
%22 = OpTypeSampledImage %11 %22 = OpTypeSampledImage %11
%v3float = OpTypeVector %float 3 %v3float = OpTypeVector %float 3
%float_0 = OpConstant %float 0 %v2float = OpTypeVector %float 2
%float_1 = OpConstant %float 1
%27 = OpConstantComposite %v2float %float_1 %float_1
%int = OpTypeInt 32 1 %int = OpTypeInt 32 1
%int_1 = OpConstant %int 1 %int_1 = OpConstant %int 1
%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float
%32 = OpTypeFunction %v4float %36 = OpTypeFunction %v4float
%float_1 = OpConstant %float 1
%textureGather_22e930 = OpFunction %void None %15 %textureGather_22e930 = OpFunction %void None %15
%18 = OpLabel %18 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %5 %res = OpVariable %_ptr_Function_v4float Function %5
%20 = OpLoad %14 %arg_2 %20 = OpLoad %14 %arg_2
%21 = OpLoad %11 %arg_1 %21 = OpLoad %11 %arg_1
%23 = OpSampledImage %22 %21 %20 %23 = OpSampledImage %22 %21 %20
%26 = OpConvertSToF %float %int_1 %28 = OpCompositeExtract %float %27 0
%29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 %29 = OpCompositeExtract %float %27 1
%19 = OpImageGather %v4float %23 %29 %int_1 %30 = OpConvertSToF %float %int_1
%33 = OpCompositeConstruct %v3float %28 %29 %30
%19 = OpImageGather %v4float %23 %33 %int_1
OpStore %res %19 OpStore %res %19
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%vertex_main_inner = OpFunction %v4float None %32 %vertex_main_inner = OpFunction %v4float None %36
%34 = OpLabel %38 = OpLabel
%35 = OpFunctionCall %void %textureGather_22e930 %39 = OpFunctionCall %void %textureGather_22e930
OpReturnValue %5 OpReturnValue %5
OpFunctionEnd OpFunctionEnd
%vertex_main = OpFunction %void None %15 %vertex_main = OpFunction %void None %15
%37 = OpLabel %41 = OpLabel
%38 = OpFunctionCall %v4float %vertex_main_inner %42 = OpFunctionCall %v4float %vertex_main_inner
OpStore %value %38 OpStore %value %42
OpStore %vertex_point_size %float_1 OpStore %vertex_point_size %float_1
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%fragment_main = OpFunction %void None %15 %fragment_main = OpFunction %void None %15
%41 = OpLabel
%42 = OpFunctionCall %void %textureGather_22e930
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %15
%44 = OpLabel %44 = OpLabel
%45 = OpFunctionCall %void %textureGather_22e930 %45 = OpFunctionCall %void %textureGather_22e930
OpReturn OpReturn
OpFunctionEnd OpFunctionEnd
%compute_main = OpFunction %void None %15
%47 = OpLabel
%48 = OpFunctionCall %void %textureGather_22e930
OpReturn
OpFunctionEnd

View File

@ -3,7 +3,7 @@
@group(1) @binding(2) var arg_2 : sampler; @group(1) @binding(2) var arg_2 : sampler;
fn textureGather_22e930() { fn textureGather_22e930() {
var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(), 1i); var res : vec4<f32> = textureGather(1i, arg_1, arg_2, vec2<f32>(1.0f), 1i);
} }
@vertex @vertex

Some files were not shown because too many files have changed in this diff Show More