blob: c75db53c252a85a8e9dc6868941fb50e9d6ce9dc [file] [log] [blame]
diagnostic_filtering/switch_statement_attribute.wgsl:7:27 warning: 'dpdx' must only be called from uniform control flow
switch (i32(x == 0.0 && dpdx(1.0) == 0.0)) {
^^^^^^^^^
diagnostic_filtering/switch_statement_attribute.wgsl:7:24 note: control flow depends on possibly non-uniform value
switch (i32(x == 0.0 && dpdx(1.0) == 0.0)) {
^^
diagnostic_filtering/switch_statement_attribute.wgsl:7:15 note: user-defined input 'x' of 'main' may be non-uniform
switch (i32(x == 0.0 && dpdx(1.0) == 0.0)) {
^
#include <metal_stdlib>
using namespace metal;
struct tint_symbol_2 {
float x [[user(locn0)]];
};
void tint_symbol_inner(float x) {
switch(int(((x == 0.0f) && (dfdx(1.0f) == 0.0f)))) {
default: {
break;
}
}
}
fragment void tint_symbol(tint_symbol_2 tint_symbol_1 [[stage_in]]) {
tint_symbol_inner(tint_symbol_1.x);
return;
}