blob: b4ed2fc4906d143298fb80aa6a110d663c61d2de [file] [log] [blame]
diagnostic_filtering/while_loop_attribute.wgsl:5:21 warning: 'dpdx' must only be called from uniform control flow
while (x > 0.0 && dpdx(1.0) > 0.0) {
^^^^^^^^^
diagnostic_filtering/while_loop_attribute.wgsl:5:3 note: control flow depends on possibly non-uniform value
while (x > 0.0 && dpdx(1.0) > 0.0) {
^^^^^
diagnostic_filtering/while_loop_attribute.wgsl:5:21 note: return value of 'dpdx' may be non-uniform
while (x > 0.0 && dpdx(1.0) > 0.0) {
^^^^^^^^^
; 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 %main_inner "main_inner"
OpName %x "x"
OpName %v "v"
OpName %main "main"
OpDecorate %x_1 Location 0
%float = OpTypeFloat 32
%_ptr_Input_float = OpTypePointer Input %float
%x_1 = OpVariable %_ptr_Input_float Input
%void = OpTypeVoid
%4 = OpTypeFunction %void %float
%v4float = OpTypeVector %float 4
%10 = OpConstantNull %v4float
%_ptr_Function_v4float = OpTypePointer Function %v4float
%18 = OpConstantNull %float
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%29 = OpTypeFunction %void
%main_inner = OpFunction %void None %4
%x = OpFunctionParameter %float
%8 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %10
OpStore %v %10
OpBranch %13
%13 = OpLabel
OpLoopMerge %14 %15 None
OpBranch %16
%16 = OpLabel
%19 = OpFOrdGreaterThan %bool %x %18
OpSelectionMerge %21 None
OpBranchConditional %19 %22 %21
%22 = OpLabel
%23 = OpDPdx %float %float_1
%25 = OpFOrdGreaterThan %bool %23 %18
OpBranch %21
%21 = OpLabel
%26 = OpPhi %bool %19 %16 %25 %22
%17 = OpLogicalNot %bool %26
OpSelectionMerge %27 None
OpBranchConditional %17 %28 %27
%28 = OpLabel
OpBranch %14
%27 = OpLabel
OpBranch %15
%15 = OpLabel
OpBranch %13
%14 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %29
%31 = OpLabel
%33 = OpLoad %float %x_1
%32 = OpFunctionCall %void %main_inner %33
OpReturn
OpFunctionEnd