blob: c27843557e4e1815421f2a8d832b9d337c5917f1 [file]
<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) {
^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 24
; Schema: 0
OpCapability Shader
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 %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
%float_0 = OpConstant %float 0
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%20 = OpTypeFunction %void
%main_inner = OpFunction %void None %7
%x = OpFunctionParameter %float
%8 = OpLabel
%9 = OpFOrdGreaterThan %bool %x %float_0
OpSelectionMerge %12 None
OpBranchConditional %9 %12 %13
%13 = OpLabel
%14 = OpDPdx %float %float_1
%16 = OpFOrdGreaterThan %bool %14 %float_0
OpSelectionMerge %17 None
OpBranchConditional %16 %18 %17
%18 = OpLabel
OpBranch %17
%17 = OpLabel
OpBranch %12
%12 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%21 = OpLabel
%22 = OpLoad %float %main_loc0_Input None
%23 = OpFunctionCall %void %main_inner %22
OpReturn
OpFunctionEnd