test/intrinsics/gen: Use '0' for level parameters

The level parameter needs to be zero for a number of texture overloads.
Bodging the template to emit 0 instead of 1 for any `level : i32` parameter is the easiest fix here.

Change-Id: I69222578efcd0d4f4f267fb59fec691b52786d9c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57301
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2021-07-08 21:04:53 +00:00
committed by Tint LUCI CQ
parent 79fae01483
commit e4fd4a2ecd
196 changed files with 335 additions and 448 deletions

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_depth_2d, coords: vec2<i32>, level: i32) -> f32
fn textureLoad_19cf87() {
var res: f32 = textureLoad(arg_0, vec2<i32>(), 1);
var res: f32 = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2D arg_0 : register(t0, space1);
void textureLoad_19cf87() {
float res = arg_0.Load(int3(0, 0, 1)).x;
float res = arg_0.Load(int3(0, 0, 0)).x;
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_19cf87(depth2d<float, access::sample> tint_symbol_2) {
float res = tint_symbol_2.read(uint2(int2()), 1);
float res = tint_symbol_2.read(uint2(int2()), 0);
}
vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -40,7 +40,7 @@
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%21 = OpConstantNull %v2int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_float = OpTypePointer Function %float
%25 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
@@ -48,7 +48,7 @@
%15 = OpLabel
%res = OpVariable %_ptr_Function_float Function %4
%18 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4float %18 %21 Lod %int_1
%17 = OpImageFetch %v4float %18 %21 Lod %int_0
%16 = OpCompositeExtract %float %17 0
OpStore %res %16
OpReturn

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_depth_2d;
fn textureLoad_19cf87() {
var res : f32 = textureLoad(arg_0, vec2<i32>(), 1);
var res : f32 = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_1d<u32>, coords: i32, level: i32) -> vec4<u32>
fn textureLoad_1b8588() {
var res: vec4<u32> = textureLoad(arg_0, 1, 1);
var res: vec4<u32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture1D<uint4> arg_0 : register(t0, space1);
void textureLoad_1b8588() {
uint4 res = arg_0.Load(int2(1, 1));
uint4 res = arg_0.Load(int2(1, 0));
}
struct tint_symbol {

View File

@@ -1,8 +1,3 @@
SKIP: FAILED
Validation Failure:
#include <metal_stdlib>
using namespace metal;
@@ -10,60 +5,23 @@ struct tint_symbol {
float4 value [[position]];
};
void textureLoad_1b8588(thread texture1d<uint, access::sample>* const tint_symbol_2) {
uint4 res = (*(tint_symbol_2)).read(uint(1), 1);
void textureLoad_1b8588(texture1d<uint, access::sample> tint_symbol_2) {
uint4 res = tint_symbol_2.read(uint(1), 0);
}
vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
texture1d<uint, access::sample> tint_symbol_5 = tint_symbol_4;
thread texture1d<uint, access::sample>* const tint_symbol_3 = &(tint_symbol_5);
vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
textureLoad_1b8588(tint_symbol_3);
tint_symbol const tint_symbol_1 = {.value=float4()};
return tint_symbol_1;
}
fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_7 [[texture(0)]]) {
texture1d<uint, access::sample> tint_symbol_8 = tint_symbol_7;
thread texture1d<uint, access::sample>* const tint_symbol_6 = &(tint_symbol_8);
textureLoad_1b8588(tint_symbol_6);
fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
textureLoad_1b8588(tint_symbol_4);
return;
}
kernel void compute_main(texture1d<uint, access::sample> tint_symbol_10 [[texture(0)]]) {
texture1d<uint, access::sample> tint_symbol_11 = tint_symbol_10;
thread texture1d<uint, access::sample>* const tint_symbol_9 = &(tint_symbol_11);
textureLoad_1b8588(tint_symbol_9);
kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
textureLoad_1b8588(tint_symbol_5);
return;
}
Compilation failed:
program_source:9:34: error: no matching member function for call to 'read'
uint4 res = (*(tint_symbol_2)).read(uint(1), 1);
~~~~~~~~~~~~~~~~~~~^~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1132:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const device metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1164:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const constant metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1196:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const ray_data metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1117:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const device metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1149:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const constant metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1181:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<uint, access::sample>' (aka 'texture1d<unsigned int, access::sample>')), parameter type must be 'const ray_data metal::texture1d<unsigned int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1086:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1101:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 40
; Bound: 41
; Schema: 0
OpCapability Shader
OpCapability Sampled1D
@@ -42,38 +42,39 @@
%v4uint = OpTypeVector %uint 4
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%24 = OpConstantNull %v4uint
%25 = OpTypeFunction %void %v4float
%25 = OpConstantNull %v4uint
%26 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
%textureLoad_1b8588 = OpFunction %void None %13
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %24
%res = OpVariable %_ptr_Function_v4uint Function %25
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4uint %19 %int_1 Lod %int_1
%17 = OpImageFetch %v4uint %19 %int_1 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %25
%tint_symbol_2 = OpFunction %void None %26
%tint_symbol = OpFunctionParameter %v4float
%28 = OpLabel
%29 = OpLabel
OpStore %tint_symbol_1 %tint_symbol
OpReturn
OpFunctionEnd
%vertex_main = OpFunction %void None %13
%30 = OpLabel
%31 = OpLabel
OpStore %tint_pointsize %float_1
%32 = OpFunctionCall %void %textureLoad_1b8588
%33 = OpFunctionCall %void %tint_symbol_2 %12
%33 = OpFunctionCall %void %textureLoad_1b8588
%34 = OpFunctionCall %void %tint_symbol_2 %12
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
%35 = OpLabel
%36 = OpFunctionCall %void %textureLoad_1b8588
%36 = OpLabel
%37 = OpFunctionCall %void %textureLoad_1b8588
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
%38 = OpLabel
%39 = OpFunctionCall %void %textureLoad_1b8588
%39 = OpLabel
%40 = OpFunctionCall %void %textureLoad_1b8588
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_1d<u32>;
fn textureLoad_1b8588() {
var res : vec4<u32> = textureLoad(arg_0, 1, 1);
var res : vec4<u32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_3d<f32>, coords: vec3<i32>, level: i32) -> vec4<f32>
fn textureLoad_1f2016() {
var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1);
var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture3D<float4> arg_0 : register(t0, space1);
void textureLoad_1f2016() {
float4 res = arg_0.Load(int4(0, 0, 0, 1));
float4 res = arg_0.Load(int4(0, 0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_1f2016(texture3d<float, access::sample> tint_symbol_2) {
float4 res = tint_symbol_2.read(uint3(int3()), 1);
float4 res = tint_symbol_2.read(uint3(int3()), 0);
}
vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -40,7 +40,7 @@
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%20 = OpConstantNull %v3int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
%24 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
@@ -48,7 +48,7 @@
%15 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %11
%17 = OpLoad %7 %arg_0
%16 = OpImageFetch %v4float %17 %20 Lod %int_1
%16 = OpImageFetch %v4float %17 %20 Lod %int_0
OpStore %res %16
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_3d<f32>;
fn textureLoad_1f2016() {
var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(), 1);
var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d<f32>, coords: vec2<i32>, level: i32) -> vec4<f32>
fn textureLoad_484344() {
var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1);
var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2D<float4> arg_0 : register(t0, space1);
void textureLoad_484344() {
float4 res = arg_0.Load(int3(0, 0, 1));
float4 res = arg_0.Load(int3(0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_484344(texture2d<float, access::sample> tint_symbol_2) {
float4 res = tint_symbol_2.read(uint2(int2()), 1);
float4 res = tint_symbol_2.read(uint2(int2()), 0);
}
vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -40,7 +40,7 @@
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%20 = OpConstantNull %v2int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
%24 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
@@ -48,7 +48,7 @@
%15 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %11
%17 = OpLoad %7 %arg_0
%16 = OpImageFetch %v4float %17 %20 Lod %int_1
%16 = OpImageFetch %v4float %17 %20 Lod %int_0
OpStore %res %16
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d<f32>;
fn textureLoad_484344() {
var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1);
var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_3d<i32>, coords: vec3<i32>, level: i32) -> vec4<i32>
fn textureLoad_4fd803() {
var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1);
var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture3D<int4> arg_0 : register(t0, space1);
void textureLoad_4fd803() {
int4 res = arg_0.Load(int4(0, 0, 0, 1));
int4 res = arg_0.Load(int4(0, 0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_4fd803(texture3d<int, access::sample> tint_symbol_2) {
int4 res = tint_symbol_2.read(uint3(int3()), 1);
int4 res = tint_symbol_2.read(uint3(int3()), 0);
}
vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -41,7 +41,7 @@
%v4int = OpTypeVector %int 4
%v3int = OpTypeVector %int 3
%21 = OpConstantNull %v3int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4int = OpTypePointer Function %v4int
%25 = OpConstantNull %v4int
%26 = OpTypeFunction %void %v4float
@@ -50,7 +50,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %25
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4int %19 %21 Lod %int_1
%17 = OpImageFetch %v4int %19 %21 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_3d<i32>;
fn textureLoad_4fd803() {
var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(), 1);
var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_1d<i32>, coords: i32, level: i32) -> vec4<i32>
fn textureLoad_5a2f9d() {
var res: vec4<i32> = textureLoad(arg_0, 1, 1);
var res: vec4<i32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture1D<int4> arg_0 : register(t0, space1);
void textureLoad_5a2f9d() {
int4 res = arg_0.Load(int2(1, 1));
int4 res = arg_0.Load(int2(1, 0));
}
struct tint_symbol {

View File

@@ -1,8 +1,3 @@
SKIP: FAILED
Validation Failure:
#include <metal_stdlib>
using namespace metal;
@@ -10,60 +5,23 @@ struct tint_symbol {
float4 value [[position]];
};
void textureLoad_5a2f9d(thread texture1d<int, access::sample>* const tint_symbol_2) {
int4 res = (*(tint_symbol_2)).read(uint(1), 1);
void textureLoad_5a2f9d(texture1d<int, access::sample> tint_symbol_2) {
int4 res = tint_symbol_2.read(uint(1), 0);
}
vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
texture1d<int, access::sample> tint_symbol_5 = tint_symbol_4;
thread texture1d<int, access::sample>* const tint_symbol_3 = &(tint_symbol_5);
vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
textureLoad_5a2f9d(tint_symbol_3);
tint_symbol const tint_symbol_1 = {.value=float4()};
return tint_symbol_1;
}
fragment void fragment_main(texture1d<int, access::sample> tint_symbol_7 [[texture(0)]]) {
texture1d<int, access::sample> tint_symbol_8 = tint_symbol_7;
thread texture1d<int, access::sample>* const tint_symbol_6 = &(tint_symbol_8);
textureLoad_5a2f9d(tint_symbol_6);
fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
textureLoad_5a2f9d(tint_symbol_4);
return;
}
kernel void compute_main(texture1d<int, access::sample> tint_symbol_10 [[texture(0)]]) {
texture1d<int, access::sample> tint_symbol_11 = tint_symbol_10;
thread texture1d<int, access::sample>* const tint_symbol_9 = &(tint_symbol_11);
textureLoad_5a2f9d(tint_symbol_9);
kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
textureLoad_5a2f9d(tint_symbol_5);
return;
}
Compilation failed:
program_source:9:33: error: no matching member function for call to 'read'
int4 res = (*(tint_symbol_2)).read(uint(1), 1);
~~~~~~~~~~~~~~~~~~~^~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1132:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const device metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1164:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const constant metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1196:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const ray_data metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1117:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const device metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1149:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const constant metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1181:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<int, access::sample>'), parameter type must be 'const ray_data metal::texture1d<int, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1086:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1101:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 39
; Bound: 40
; Schema: 0
OpCapability Shader
OpCapability Sampled1D
@@ -41,38 +41,39 @@
%13 = OpTypeFunction %void
%v4int = OpTypeVector %int 4
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4int = OpTypePointer Function %v4int
%23 = OpConstantNull %v4int
%24 = OpTypeFunction %void %v4float
%24 = OpConstantNull %v4int
%25 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
%textureLoad_5a2f9d = OpFunction %void None %13
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %23
%res = OpVariable %_ptr_Function_v4int Function %24
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4int %19 %int_1 Lod %int_1
%17 = OpImageFetch %v4int %19 %int_1 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %24
%tint_symbol_2 = OpFunction %void None %25
%tint_symbol = OpFunctionParameter %v4float
%27 = OpLabel
%28 = OpLabel
OpStore %tint_symbol_1 %tint_symbol
OpReturn
OpFunctionEnd
%vertex_main = OpFunction %void None %13
%29 = OpLabel
%30 = OpLabel
OpStore %tint_pointsize %float_1
%31 = OpFunctionCall %void %textureLoad_5a2f9d
%32 = OpFunctionCall %void %tint_symbol_2 %12
%32 = OpFunctionCall %void %textureLoad_5a2f9d
%33 = OpFunctionCall %void %tint_symbol_2 %12
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %13
%34 = OpLabel
%35 = OpFunctionCall %void %textureLoad_5a2f9d
%35 = OpLabel
%36 = OpFunctionCall %void %textureLoad_5a2f9d
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %13
%37 = OpLabel
%38 = OpFunctionCall %void %textureLoad_5a2f9d
%38 = OpLabel
%39 = OpFunctionCall %void %textureLoad_5a2f9d
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_1d<i32>;
fn textureLoad_5a2f9d() {
var res : vec4<i32> = textureLoad(arg_0, 1, 1);
var res : vec4<i32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d<u32>, coords: vec2<i32>, level: i32) -> vec4<u32>
fn textureLoad_6154d4() {
var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1);
var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2D<uint4> arg_0 : register(t0, space1);
void textureLoad_6154d4() {
uint4 res = arg_0.Load(int3(0, 0, 1));
uint4 res = arg_0.Load(int3(0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_6154d4(texture2d<uint, access::sample> tint_symbol_2) {
uint4 res = tint_symbol_2.read(uint2(int2()), 1);
uint4 res = tint_symbol_2.read(uint2(int2()), 0);
}
vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -42,7 +42,7 @@
%int = OpTypeInt 32 1
%v2int = OpTypeVector %int 2
%22 = OpConstantNull %v2int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%26 = OpConstantNull %v4uint
%27 = OpTypeFunction %void %v4float
@@ -51,7 +51,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %26
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4uint %19 %22 Lod %int_1
%17 = OpImageFetch %v4uint %19 %22 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d<u32>;
fn textureLoad_6154d4() {
var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1);
var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d_array<i32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<i32>
fn textureLoad_79e697() {
var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2DArray<int4> arg_0 : register(t0, space1);
void textureLoad_79e697() {
int4 res = arg_0.Load(int4(0, 0, 1, 1));
int4 res = arg_0.Load(int4(0, 0, 1, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_79e697(texture2d_array<int, access::sample> tint_symbol_2) {
int4 res = tint_symbol_2.read(uint2(int2()), 1, 1);
int4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
}
vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -51,7 +51,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %26
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4int %19 %23 Lod %int_1
%17 = OpImageFetch %v4int %19 %23 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d_array<i32>;
fn textureLoad_79e697() {
var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d_array<u32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<u32>
fn textureLoad_7c90e5() {
var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2DArray<uint4> arg_0 : register(t0, space1);
void textureLoad_7c90e5() {
uint4 res = arg_0.Load(int4(0, 0, 1, 1));
uint4 res = arg_0.Load(int4(0, 0, 1, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_7c90e5(texture2d_array<uint, access::sample> tint_symbol_2) {
uint4 res = tint_symbol_2.read(uint2(int2()), 1, 1);
uint4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
}
vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -52,7 +52,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %27
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4uint %19 %24 Lod %int_1
%17 = OpImageFetch %v4uint %19 %24 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d_array<u32>;
fn textureLoad_7c90e5() {
var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_1d<f32>, coords: i32, level: i32) -> vec4<f32>
fn textureLoad_81c381() {
var res: vec4<f32> = textureLoad(arg_0, 1, 1);
var res: vec4<f32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture1D<float4> arg_0 : register(t0, space1);
void textureLoad_81c381() {
float4 res = arg_0.Load(int2(1, 1));
float4 res = arg_0.Load(int2(1, 0));
}
struct tint_symbol {

View File

@@ -1,8 +1,3 @@
SKIP: FAILED
Validation Failure:
#include <metal_stdlib>
using namespace metal;
@@ -10,60 +5,23 @@ struct tint_symbol {
float4 value [[position]];
};
void textureLoad_81c381(thread texture1d<float, access::sample>* const tint_symbol_2) {
float4 res = (*(tint_symbol_2)).read(uint(1), 1);
void textureLoad_81c381(texture1d<float, access::sample> tint_symbol_2) {
float4 res = tint_symbol_2.read(uint(1), 0);
}
vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
texture1d<float, access::sample> tint_symbol_5 = tint_symbol_4;
thread texture1d<float, access::sample>* const tint_symbol_3 = &(tint_symbol_5);
vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
textureLoad_81c381(tint_symbol_3);
tint_symbol const tint_symbol_1 = {.value=float4()};
return tint_symbol_1;
}
fragment void fragment_main(texture1d<float, access::sample> tint_symbol_7 [[texture(0)]]) {
texture1d<float, access::sample> tint_symbol_8 = tint_symbol_7;
thread texture1d<float, access::sample>* const tint_symbol_6 = &(tint_symbol_8);
textureLoad_81c381(tint_symbol_6);
fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
textureLoad_81c381(tint_symbol_4);
return;
}
kernel void compute_main(texture1d<float, access::sample> tint_symbol_10 [[texture(0)]]) {
texture1d<float, access::sample> tint_symbol_11 = tint_symbol_10;
thread texture1d<float, access::sample>* const tint_symbol_9 = &(tint_symbol_11);
textureLoad_81c381(tint_symbol_9);
kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
textureLoad_81c381(tint_symbol_5);
return;
}
Compilation failed:
program_source:9:35: error: no matching member function for call to 'read'
float4 res = (*(tint_symbol_2)).read(uint(1), 1);
~~~~~~~~~~~~~~~~~~~^~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1132:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const device metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1164:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const constant metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1196:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const ray_data metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1117:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const device metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const device METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1149:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const constant metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const constant METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1181:24: note: candidate function not viable: address space mismatch in 'this' argument ('texture1d<float, access::sample>'), parameter type must be 'const ray_data metal::texture1d<float, metal::access::sample, void>'
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const ray_data METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1086:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(ushort coord, ushort lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/lib/clang/31001.189/include/metal/metal_texture:1101:24: note: candidate disabled: 'lod' argument value must be 0
METAL_FUNC vec<T, 4> read(uint coord, uint lod = 0) const thread METAL_CONST_ARG(lod) METAL_ZERO_ARG(lod)
^ ~~~~~~~~~~~~~~~~~~~

View File

@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; Bound: 38
; Schema: 0
OpCapability Shader
OpCapability Sampled1D
@@ -40,37 +40,38 @@
%12 = OpTypeFunction %void
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4float = OpTypePointer Function %v4float
%22 = OpTypeFunction %void %v4float
%23 = OpTypeFunction %void %v4float
%float_1 = OpConstant %float 1
%textureLoad_81c381 = OpFunction %void None %12
%15 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %11
%17 = OpLoad %7 %arg_0
%16 = OpImageFetch %v4float %17 %int_1 Lod %int_1
%16 = OpImageFetch %v4float %17 %int_1 Lod %int_0
OpStore %res %16
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %22
%tint_symbol_2 = OpFunction %void None %23
%tint_symbol = OpFunctionParameter %v4float
%25 = OpLabel
%26 = OpLabel
OpStore %tint_symbol_1 %tint_symbol
OpReturn
OpFunctionEnd
%vertex_main = OpFunction %void None %12
%27 = OpLabel
%28 = OpLabel
OpStore %tint_pointsize %float_1
%29 = OpFunctionCall %void %textureLoad_81c381
%30 = OpFunctionCall %void %tint_symbol_2 %11
%30 = OpFunctionCall %void %textureLoad_81c381
%31 = OpFunctionCall %void %tint_symbol_2 %11
OpReturn
OpFunctionEnd
%fragment_main = OpFunction %void None %12
%32 = OpLabel
%33 = OpFunctionCall %void %textureLoad_81c381
%33 = OpLabel
%34 = OpFunctionCall %void %textureLoad_81c381
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %12
%35 = OpLabel
%36 = OpFunctionCall %void %textureLoad_81c381
%36 = OpLabel
%37 = OpFunctionCall %void %textureLoad_81c381
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_1d<f32>;
fn textureLoad_81c381() {
var res : vec4<f32> = textureLoad(arg_0, 1, 1);
var res : vec4<f32> = textureLoad(arg_0, 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d_array<f32>, coords: vec2<i32>, array_index: i32, level: i32) -> vec4<f32>
fn textureLoad_87be85() {
var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2DArray<float4> arg_0 : register(t0, space1);
void textureLoad_87be85() {
float4 res = arg_0.Load(int4(0, 0, 1, 1));
float4 res = arg_0.Load(int4(0, 0, 1, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_87be85(texture2d_array<float, access::sample> tint_symbol_2) {
float4 res = tint_symbol_2.read(uint2(int2()), 1, 1);
float4 res = tint_symbol_2.read(uint2(int2()), 1, 0);
}
vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -49,7 +49,7 @@
%15 = OpLabel
%res = OpVariable %_ptr_Function_v4float Function %11
%17 = OpLoad %7 %arg_0
%16 = OpImageFetch %v4float %17 %22 Lod %int_1
%16 = OpImageFetch %v4float %17 %22 Lod %int_0
OpStore %res %16
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d_array<f32>;
fn textureLoad_87be85() {
var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_depth_2d_array, coords: vec2<i32>, array_index: i32, level: i32) -> f32
fn textureLoad_9b2667() {
var res: f32 = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res: f32 = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2DArray arg_0 : register(t0, space1);
void textureLoad_9b2667() {
float res = arg_0.Load(int4(0, 0, 1, 1)).x;
float res = arg_0.Load(int4(0, 0, 1, 0)).x;
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_9b2667(depth2d_array<float, access::sample> tint_symbol_2) {
float res = tint_symbol_2.read(uint2(int2()), 1, 1);
float res = tint_symbol_2.read(uint2(int2()), 1, 0);
}
vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -49,7 +49,7 @@
%15 = OpLabel
%res = OpVariable %_ptr_Function_float Function %4
%18 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4float %18 %23 Lod %int_1
%17 = OpImageFetch %v4float %18 %23 Lod %int_0
%16 = OpCompositeExtract %float %17 0
OpStore %res %16
OpReturn

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_depth_2d_array;
fn textureLoad_9b2667() {
var res : f32 = textureLoad(arg_0, vec2<i32>(), 1, 1);
var res : f32 = textureLoad(arg_0, vec2<i32>(), 1, 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_3d<u32>, coords: vec3<i32>, level: i32) -> vec4<u32>
fn textureLoad_a9a9f5() {
var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1);
var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture3D<uint4> arg_0 : register(t0, space1);
void textureLoad_a9a9f5() {
uint4 res = arg_0.Load(int4(0, 0, 0, 1));
uint4 res = arg_0.Load(int4(0, 0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_a9a9f5(texture3d<uint, access::sample> tint_symbol_2) {
uint4 res = tint_symbol_2.read(uint3(int3()), 1);
uint4 res = tint_symbol_2.read(uint3(int3()), 0);
}
vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -42,7 +42,7 @@
%int = OpTypeInt 32 1
%v3int = OpTypeVector %int 3
%22 = OpConstantNull %v3int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4uint = OpTypePointer Function %v4uint
%26 = OpConstantNull %v4uint
%27 = OpTypeFunction %void %v4float
@@ -51,7 +51,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4uint Function %26
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4uint %19 %22 Lod %int_1
%17 = OpImageFetch %v4uint %19 %22 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_3d<u32>;
fn textureLoad_a9a9f5() {
var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(), 1);
var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -26,7 +26,7 @@
// fn textureLoad(texture: texture_2d<i32>, coords: vec2<i32>, level: i32) -> vec4<i32>
fn textureLoad_c2a480() {
var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1);
var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]

View File

@@ -1,7 +1,7 @@
Texture2D<int4> arg_0 : register(t0, space1);
void textureLoad_c2a480() {
int4 res = arg_0.Load(int3(0, 0, 1));
int4 res = arg_0.Load(int3(0, 0, 0));
}
struct tint_symbol {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureLoad_c2a480(texture2d<int, access::sample> tint_symbol_2) {
int4 res = tint_symbol_2.read(uint2(int2()), 1);
int4 res = tint_symbol_2.read(uint2(int2()), 0);
}
vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {

View File

@@ -41,7 +41,7 @@
%v4int = OpTypeVector %int 4
%v2int = OpTypeVector %int 2
%21 = OpConstantNull %v2int
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%_ptr_Function_v4int = OpTypePointer Function %v4int
%25 = OpConstantNull %v4int
%26 = OpTypeFunction %void %v4float
@@ -50,7 +50,7 @@
%16 = OpLabel
%res = OpVariable %_ptr_Function_v4int Function %25
%19 = OpLoad %7 %arg_0
%17 = OpImageFetch %v4int %19 %21 Lod %int_1
%17 = OpImageFetch %v4int %19 %21 Lod %int_0
OpStore %res %17
OpReturn
OpFunctionEnd

View File

@@ -1,7 +1,7 @@
[[group(1), binding(0)]] var arg_0 : texture_2d<i32>;
fn textureLoad_c2a480() {
var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 1);
var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(), 0);
}
[[stage(vertex)]]