blob: 9676d8fa65d277baaf18918ee36e3996b3d320ff [file] [log] [blame] [edit]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
device int3* prevent_dce;
};
struct VertexOutput {
float4 pos;
int3 prevent_dce;
};
struct vertex_main_outputs {
float4 VertexOutput_pos [[position]];
int3 VertexOutput_prevent_dce [[user(locn0)]] [[flat]];
};
int3 sign_9603b1() {
int3 arg_0 = int3(1);
int3 res = sign(arg_0);
return res;
}
fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
(*tint_module_vars.prevent_dce) = sign_9603b1();
}
kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
(*tint_module_vars.prevent_dce) = sign_9603b1();
}
VertexOutput vertex_main_inner() {
VertexOutput out = {};
out.pos = float4(0.0f);
out.prevent_dce = sign_9603b1();
return out;
}
vertex vertex_main_outputs vertex_main() {
VertexOutput const v = vertex_main_inner();
return vertex_main_outputs{.VertexOutput_pos=v.pos, .VertexOutput_prevent_dce=v.prevent_dce};
}
program_source:20:14: error: no matching function for call to 'sign'
int3 res = sign(arg_0);
^~~~
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:303:17: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'half' for 1st argument
METAL_FUNC half sign(half x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:320:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half2' (aka 'half2') for 1st argument
METAL_FUNC half2 sign(half2 x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:337:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half3' (aka 'half3') for 1st argument
METAL_FUNC half3 sign(half3 x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:354:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::half4' (aka 'half4') for 1st argument
METAL_FUNC half4 sign(half4 x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:409:18: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'float' for 1st argument
METAL_FUNC float sign(float x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:426:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float2' (aka 'float2') for 1st argument
METAL_FUNC float2 sign(float2 x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:443:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float3' (aka 'float3') for 1st argument
METAL_FUNC float3 sign(float3 x)
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_common:460:19: note: candidate function not viable: no known conversion from 'int3' (vector of 3 'int' values) to 'metal::float4' (aka 'float4') for 1st argument
METAL_FUNC float4 sign(float4 x)
^