| <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; 1 | |
| ; Bound: 65 | |
| ; 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 | |
| %_ptr_Function_float = OpTypePointer Function %float | |
| %uint_0 = OpConstant %uint 0 | |
| %false = OpConstantFalse %bool | |
| %_ptr_Function_uint = OpTypePointer Function %uint | |
| %uint_1 = OpConstant %uint 1 | |
| %float_1 = OpConstant %float 1 | |
| %float_0 = OpConstant %float 0 | |
| %61 = 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 = OpAccessChain %_ptr_Function_float %v %uint_0 | |
| %35 = OpLoad %float %32 None | |
| %36 = OpFOrdGreaterThan %bool %x %35 | |
| OpSelectionMerge %37 None | |
| OpBranchConditional %36 %38 %39 | |
| %38 = OpLabel | |
| %57 = OpDPdx %float %float_1 | |
| %41 = OpFOrdGreaterThan %bool %57 %float_0 | |
| OpBranch %37 | |
| %39 = OpLabel | |
| OpBranch %37 | |
| %37 = OpLabel | |
| %40 = OpPhi %bool %41 %38 %false %39 | |
| OpSelectionMerge %43 None | |
| OpBranchConditional %40 %43 %44 | |
| %44 = OpLabel | |
| OpBranch %17 | |
| %43 = OpLabel | |
| OpBranch %15 | |
| %15 = OpLabel | |
| %45 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0 | |
| %47 = OpLoad %uint %45 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 %61 | |
| %62 = OpLabel | |
| %63 = OpLoad %float %main_loc0_Input None | |
| %64 = OpFunctionCall %void %main_inner %63 | |
| OpReturn | |
| OpFunctionEnd |