blob: 69b01be53e5d4ca2a1916d63bb832052c1399a3b [file] [log] [blame] [edit]
diagnostic_filtering/switch_body_attribute.wgsl:5:11 warning: 'dpdx' must only be called from uniform control flow
_ = dpdx(1.0);
^^^^^^^^^
diagnostic_filtering/switch_body_attribute.wgsl:3:3 note: control flow depends on possibly non-uniform value
switch (i32(x)) @diagnostic(warning, derivative_uniformity) {
^^^^^^
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: 32
; 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
%27 = 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
OpBranch %24
%24 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %27
%29 = OpLabel
%31 = OpLoad %float %x_1
%30 = OpFunctionCall %void %main_inner %31
OpReturn
OpFunctionEnd