| <dawn>/test/tint/diagnostic_filtering/case_body_attribute.wgsl:8:11 warning: 'textureSample' must only be called from uniform control flow |
| _ = textureSample(t, s, vec2(0, 0)); |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/case_body_attribute.wgsl:6:3 note: control flow depends on possibly non-uniform value |
| switch (i32(x)) { |
| ^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/case_body_attribute.wgsl:6:15 note: user-defined input 'x' of 'main' may be non-uniform |
| switch (i32(x)) { |
| ^ |
| |
| #include <metal_stdlib> |
| |
| using namespace metal; |
| int tint_ftoi(float v) { |
| return select(2147483647, select(int(v), (-2147483647 - 1), (v < -2147483648.0f)), (v < 2147483520.0f)); |
| } |
| |
| struct tint_symbol_2 { |
| float x [[user(locn0)]]; |
| }; |
| |
| void tint_symbol_inner(float x, texture2d<float, access::sample> tint_symbol_3, sampler tint_symbol_4) { |
| switch(tint_ftoi(x)) { |
| case 0: { |
| float4 const tint_phony = tint_symbol_3.sample(tint_symbol_4, float2(0.0f)); |
| break; |
| } |
| default: { |
| break; |
| } |
| } |
| } |
| |
| fragment void tint_symbol(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]], sampler tint_symbol_6 [[sampler(0)]], tint_symbol_2 tint_symbol_1 [[stage_in]]) { |
| tint_symbol_inner(tint_symbol_1.x, tint_symbol_5, tint_symbol_6); |
| return; |
| } |
| |