| <dawn>/test/tint/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) { | |
| ^^^^^^^^^ | |
| <dawn>/test/tint/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) { | |
| ^^^^^ | |
| <dawn>/test/tint/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; 1 | |
| ; Bound: 62 | |
| ; 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 %v "v" | |
| OpName %tint_loop_idx "tint_loop_idx" | |
| OpName %tint_low_inc "tint_low_inc" | |
| OpName %tint_carry "tint_carry" | |
| 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 | |
| %v4float = OpTypeVector %float 4 | |
| %_ptr_Function_v4float = OpTypePointer Function %v4float | |
| %12 = OpConstantNull %v4float | |
| %uint = OpTypeInt 32 0 | |
| %v2uint = OpTypeVector %uint 2 | |
| %_ptr_Function_v2uint = OpTypePointer Function %v2uint | |
| %uint_4294967295 = OpConstant %uint 4294967295 | |
| %22 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295 | |
| %26 = OpConstantNull %v2uint | |
| %bool = OpTypeBool | |
| %v2bool = OpTypeVector %bool 2 | |
| %float_0 = OpConstant %float 0 | |
| %float_1 = OpConstant %float 1 | |
| %false = OpConstantFalse %bool | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %uint_0 = OpConstant %uint 0 | |
| %uint_1 = OpConstant %uint 1 | |
| %58 = OpTypeFunction %void | |
| %main_inner = OpFunction %void None %7 | |
| %x = OpFunctionParameter %float | |
| %8 = OpLabel | |
| %v = OpVariable %_ptr_Function_v4float Function | |
| %tint_loop_idx = OpVariable %_ptr_Function_v2uint Function | |
| OpStore %v %12 | |
| OpBranch %13 | |
| %13 = OpLabel | |
| OpStore %tint_loop_idx %22 | |
| OpBranch %16 | |
| %16 = OpLabel | |
| OpLoopMerge %17 %15 None | |
| OpBranch %14 | |
| %14 = OpLabel | |
| %24 = OpLoad %v2uint %tint_loop_idx None | |
| %25 = OpIEqual %v2bool %24 %26 | |
| %29 = OpAll %bool %25 | |
| OpSelectionMerge %30 None | |
| OpBranchConditional %29 %31 %30 | |
| %31 = OpLabel | |
| OpBranch %17 | |
| %30 = OpLabel | |
| %32 = OpFOrdGreaterThan %bool %x %float_0 | |
| OpSelectionMerge %34 None | |
| OpBranchConditional %32 %35 %36 | |
| %35 = OpLabel | |
| %37 = OpDPdx %float %float_1 | |
| %39 = OpFOrdGreaterThan %bool %37 %float_0 | |
| OpBranch %34 | |
| %36 = OpLabel | |
| OpBranch %34 | |
| %34 = OpLabel | |
| %40 = OpPhi %bool %39 %35 %false %36 | |
| OpSelectionMerge %42 None | |
| OpBranchConditional %40 %42 %43 | |
| %43 = OpLabel | |
| OpBranch %17 | |
| %42 = OpLabel | |
| OpBranch %15 | |
| %15 = OpLabel | |
| %44 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| %47 = OpLoad %uint %44 None | |
| %tint_low_inc = OpISub %uint %47 %uint_1 | |
| %50 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| OpStore %50 %tint_low_inc None | |
| %51 = OpIEqual %bool %tint_low_inc %uint_4294967295 | |
| %tint_carry = OpSelect %uint %51 %uint_1 %uint_0 | |
| %53 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| %54 = OpLoad %uint %53 None | |
| %55 = OpISub %uint %54 %tint_carry | |
| %56 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1 | |
| OpStore %56 %55 None | |
| OpBranch %16 | |
| %17 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %main = OpFunction %void None %58 | |
| %59 = OpLabel | |
| %60 = OpLoad %float %main_loc0_Input None | |
| %61 = OpFunctionCall %void %main_inner %60 | |
| OpReturn | |
| OpFunctionEnd |