| <dawn>/test/tint/diagnostic_filtering/switch_body_attribute.wgsl:5:11 warning: 'dpdx' must only be called from uniform control flow |
| _ = dpdx(1.0); |
| ^^^^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/switch_body_attribute.wgsl:3:3 note: control flow depends on possibly non-uniform value |
| switch (i32(x)) @diagnostic(warning, derivative_uniformity) { |
| ^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/switch_body_attribute.wgsl:3:15 note: user-defined input 'x' of 'main' may be non-uniform |
| switch (i32(x)) @diagnostic(warning, derivative_uniformity) { |
| ^ |
| |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 34 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %x_1 |
| OpExecutionMode %main OriginUpperLeft |
| OpName %x_1 "x_1" |
| OpName %tint_ftoi "tint_ftoi" |
| OpName %v "v" |
| OpName %main_inner "main_inner" |
| OpName %x "x" |
| OpName %main "main" |
| OpDecorate %x_1 Location 0 |
| %float = OpTypeFloat 32 |
| %_ptr_Input_float = OpTypePointer Input %float |
| %x_1 = OpVariable %_ptr_Input_float Input |
| %int = OpTypeInt 32 1 |
| %4 = OpTypeFunction %int %float |
| %float_2_14748352e_09 = OpConstant %float 2.14748352e+09 |
| %bool = OpTypeBool |
| %float_n2_14748365e_09 = OpConstant %float -2.14748365e+09 |
| %int_n2147483648 = OpConstant %int -2147483648 |
| %int_2147483647 = OpConstant %int 2147483647 |
| %void = OpTypeVoid |
| %19 = OpTypeFunction %void %float |
| %float_1 = OpConstant %float 1 |
| %29 = OpTypeFunction %void |
| %tint_ftoi = OpFunction %int None %4 |
| %v = OpFunctionParameter %float |
| %8 = OpLabel |
| %11 = OpFOrdLessThan %bool %v %float_2_14748352e_09 |
| %15 = OpFOrdLessThan %bool %v %float_n2_14748365e_09 |
| %17 = OpConvertFToS %int %v |
| %13 = OpSelect %int %15 %int_n2147483648 %17 |
| %9 = OpSelect %int %11 %13 %int_2147483647 |
| OpReturnValue %9 |
| OpFunctionEnd |
| %main_inner = OpFunction %void None %19 |
| %x = OpFunctionParameter %float |
| %23 = OpLabel |
| %25 = OpFunctionCall %int %tint_ftoi %x |
| OpSelectionMerge %24 None |
| OpSwitch %25 %26 |
| %26 = OpLabel |
| %27 = OpDPdx %float %float_1 |
| OpBranch %24 |
| %24 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %29 |
| %31 = OpLabel |
| %33 = OpLoad %float %x_1 |
| %32 = OpFunctionCall %void %main_inner %33 |
| OpReturn |
| OpFunctionEnd |