blob: 55a628ec0785c117195b7cb683125aebd9218c39 [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
sampler Sampler;
texture2d<float, access::sample> randomTexture;
texture2d<float, access::sample> depthTexture;
};
struct tint_symbol_outputs {
float4 tint_symbol_1 [[color(0)]];
};
struct tint_symbol_inputs {
float2 vUV [[user(locn0)]];
};
float4 tint_symbol_inner(float2 vUV, tint_module_vars_struct tint_module_vars) {
float3 const random = tint_module_vars.randomTexture.sample(tint_module_vars.Sampler, vUV).xyz;
int i = 0;
{
while(true) {
if ((i < 1)) {
} else {
break;
}
float3 const offset = float3(random[0u]);
bool v = false;
if ((offset[0u] < 0.0f)) {
v = true;
} else {
v = (offset[1u] < 0.0f);
}
bool v_1 = false;
if (v) {
v_1 = true;
} else {
v_1 = (offset[0u] > 1.0f);
}
bool v_2 = false;
if (v_1) {
v_2 = true;
} else {
v_2 = (offset[1u] > 1.0f);
}
if (v_2) {
i = (i + 1);
{
}
continue;
}
float const sampleDepth = 0.0f;
i = (i + 1);
{
}
continue;
}
}
return float4(1.0f);
}
fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], sampler Sampler [[sampler(0)]], texture2d<float, access::sample> randomTexture [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture};
return tint_symbol_outputs{.tint_symbol_1=tint_symbol_inner(inputs.vUV, tint_module_vars)};
}
program_source:52:19: warning: unused variable 'sampleDepth' [-Wunused-variable]
float const sampleDepth = 0.0f;
^
program_source:63:122: error: call to deleted constructor of 'texture2d<float, access::sample>'
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture};
^
/System/Library/PrivateFrameworks/GPUCompiler.framework/Versions/32023/Libraries/lib/clang/32023.194/include/metal/metal_texture:6083:3: note: 'texture2d' has been explicitly marked deleted here
texture2d() thread = delete;
^
program_source:7:36: note: in implicit initialization of field 'depthTexture' with omitted initializer
texture2d<float, access::sample> depthTexture;
^