| <dawn>/test/tint/diagnostic_filtering/for_loop_attribute.wgsl:5:21 warning: 'dpdx' must only be called from uniform control flow |
| for (; x > v.x && dpdx(1.0) > 0.0; ) { |
| ^^^^^^^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/for_loop_attribute.wgsl:5:3 note: control flow depends on possibly non-uniform value |
| for (; x > v.x && dpdx(1.0) > 0.0; ) { |
| ^^^ |
| |
| <dawn>/test/tint/diagnostic_filtering/for_loop_attribute.wgsl:5:21 note: return value of 'dpdx' may be non-uniform |
| for (; x > v.x && dpdx(1.0) > 0.0; ) { |
| ^^^^^^^^^ |
| |
| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 43 |
| ; 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 %tint_symbol "tint_symbol" |
| 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 |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Function_float = OpTypePointer Function %float |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %26 = OpConstantNull %bool |
| %float_1 = OpConstant %float 1 |
| %32 = OpConstantNull %float |
| %38 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %4 |
| %x = OpFunctionParameter %float |
| %8 = OpLabel |
| %v = OpVariable %_ptr_Function_v4float Function %10 |
| %tint_symbol = OpVariable %_ptr_Function_bool Function %26 |
| OpStore %v %10 |
| OpBranch %13 |
| %13 = OpLabel |
| OpLoopMerge %14 %15 None |
| OpBranch %16 |
| %16 = OpLabel |
| %20 = OpAccessChain %_ptr_Function_float %v %uint_0 |
| %21 = OpLoad %float %20 |
| %22 = OpFOrdGreaterThan %bool %x %21 |
| OpStore %tint_symbol %22 |
| %27 = OpLoad %bool %tint_symbol |
| OpSelectionMerge %28 None |
| OpBranchConditional %27 %29 %28 |
| %29 = OpLabel |
| %30 = OpDPdx %float %float_1 |
| %33 = OpFOrdGreaterThan %bool %30 %32 |
| OpStore %tint_symbol %33 |
| OpBranch %28 |
| %28 = OpLabel |
| %35 = OpLoad %bool %tint_symbol |
| %34 = OpLogicalNot %bool %35 |
| OpSelectionMerge %36 None |
| OpBranchConditional %34 %37 %36 |
| %37 = OpLabel |
| OpBranch %14 |
| %36 = OpLabel |
| OpBranch %15 |
| %15 = OpLabel |
| OpBranch %13 |
| %14 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %38 |
| %40 = OpLabel |
| %42 = OpLoad %float %x_1 |
| %41 = OpFunctionCall %void %main_inner %42 |
| OpReturn |
| OpFunctionEnd |