| <dawn>/test/tint/diagnostic_filtering/if_statement_attribute.wgsl:8:14 warning: 'dpdx' must only be called from uniform control flow | |
| } else if (dpdx(1.0) > 0) { | |
| ^^^^^^^^^ | |
| <dawn>/test/tint/diagnostic_filtering/if_statement_attribute.wgsl:7:3 note: control flow depends on possibly non-uniform value | |
| if (x > 0) { | |
| ^^ | |
| <dawn>/test/tint/diagnostic_filtering/if_statement_attribute.wgsl:7:7 note: user-defined input 'x' of 'main' may be non-uniform | |
| if (x > 0) { | |
| ^ | |
| #include <metal_stdlib> | |
| using namespace metal; | |
| struct tint_symbol_3 { | |
| float x [[user(locn0)]]; | |
| }; | |
| void tint_symbol_inner(float x) { | |
| if ((x > 0.0f)) { | |
| } else { | |
| float const tint_symbol_1 = dfdx(1.0f); | |
| if ((tint_symbol_1 > 0.0f)) { | |
| } | |
| } | |
| } | |
| fragment void tint_symbol(tint_symbol_3 tint_symbol_2 [[stage_in]]) { | |
| tint_symbol_inner(tint_symbol_2.x); | |
| return; | |
| } | |