blob: d9149e3b86c3b75e8dfa39a1bde6d78ba4acb1a4 [file] [log] [blame]
<dawn>/test/tint/diagnostic_filtering/else_body_attribute.wgsl:8:9 warning: 'textureSample' must only be called from uniform control flow
_ = textureSample(t, s, vec2(0, 0));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<dawn>/test/tint/diagnostic_filtering/else_body_attribute.wgsl:6:3 note: control flow depends on possibly non-uniform value
if (x > 0) {
^^
<dawn>/test/tint/diagnostic_filtering/else_body_attribute.wgsl:6:7 note: user-defined input 'x' of 'main' may be non-uniform
if (x > 0) {
^
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
texture2d<float, access::sample> t;
sampler s;
};
struct tint_symbol_inputs {
float x [[user(locn0)]];
};
void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) {
if ((x > 0.0f)) {
} else {
tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f));
}
}
fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d<float, access::sample> t [[texture(0)]], sampler s [[sampler(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s};
tint_symbol_inner(inputs.x, tint_module_vars);
}