| <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; 1 | |
| ; Bound: 29 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| %20 = OpExtInstImport "GLSL.std.450" | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint Fragment %main "main" %main_loc0_Input | |
| OpExecutionMode %main OriginUpperLeft | |
| OpName %main_loc0_Input "main_loc0_Input" | |
| OpName %main_inner "main_inner" | |
| OpName %x "x" | |
| OpName %tint_f32_to_i32 "tint_f32_to_i32" | |
| OpName %value "value" | |
| OpName %main "main" | |
| OpDecorate %main_loc0_Input Location 0 | |
| %float = OpTypeFloat 32 | |
| %_ptr_Input_float = OpTypePointer Input %float | |
| %main_loc0_Input = OpVariable %_ptr_Input_float Input | |
| %void = OpTypeVoid | |
| %7 = OpTypeFunction %void %float | |
| %int = OpTypeInt 32 1 | |
| %float_1 = OpConstant %float 1 | |
| %17 = OpTypeFunction %int %float | |
| %float_n2_14748365e_09 = OpConstant %float -2.14748365e+09 | |
| %float_2_14748352e_09 = OpConstant %float 2.14748352e+09 | |
| %25 = OpTypeFunction %void | |
| %main_inner = OpFunction %void None %7 | |
| %x = OpFunctionParameter %float | |
| %8 = OpLabel | |
| %9 = OpFunctionCall %int %tint_f32_to_i32 %x | |
| OpSelectionMerge %13 None | |
| OpSwitch %9 %12 | |
| %12 = OpLabel | |
| %14 = OpDPdx %float %float_1 | |
| OpBranch %13 | |
| %13 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %tint_f32_to_i32 = OpFunction %int None %17 | |
| %value = OpFunctionParameter %float | |
| %18 = OpLabel | |
| %19 = OpExtInst %float %20 NClamp %value %float_n2_14748365e_09 %float_2_14748352e_09 | |
| %23 = OpConvertFToS %int %19 | |
| OpReturnValue %23 | |
| OpFunctionEnd | |
| %main = OpFunction %void None %25 | |
| %26 = OpLabel | |
| %27 = OpLoad %float %main_loc0_Input None | |
| %28 = OpFunctionCall %void %main_inner %27 | |
| OpReturn | |
| OpFunctionEnd |