Reland "Add SkSL for-loop control flow test to dm."
This reverts commit 578f1acbe8a47178efb21df49561c365226f9d95.
Reason for revert: updated test to pass on Mac Intel 5100/6000
Original change's description:
> Revert "Add SkSL for-loop control flow test to dm."
>
> This reverts commit a0c266283a8ef230ad0436dbf885d2b616e7302b.
>
> Reason for revert: failing on Mac Intel
>
> Original change's description:
> > Add SkSL for-loop control flow test to dm.
> >
> > While loops and do-while loops remain untested in dm, as they are not
> > supported in ES2 (and therefore not available in Runtime Effects).
> >
> > Change-Id: I2f1bfccccd571cc4ced096bc18ebbb9ecc9f9b4a
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359556
> > Commit-Queue: John Stiles <johnstiles@google.com>
> > Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> > Auto-Submit: John Stiles <johnstiles@google.com>
> > Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
>
> TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
>
> Change-Id: I45335d16a695644eaeb8a535298c0efcc616c1ce
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359840
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I2dc6e870393708a12286658001b723f25a6aec4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359856
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/tests/sksl/shared/ForLoopControlFlow.asm.frag b/tests/sksl/shared/ForLoopControlFlow.asm.frag
index bc59e24..e06c2d6 100644
--- a/tests/sksl/shared/ForLoopControlFlow.asm.frag
+++ b/tests/sksl/shared/ForLoopControlFlow.asm.frag
@@ -28,8 +28,8 @@
OpDecorate %21 RelaxedPrecision
OpDecorate %30 RelaxedPrecision
OpDecorate %34 RelaxedPrecision
-OpDecorate %38 RelaxedPrecision
-OpDecorate %44 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
OpDecorate %46 RelaxedPrecision
OpDecorate %53 RelaxedPrecision
OpDecorate %55 RelaxedPrecision
@@ -53,10 +53,10 @@
%_ptr_Function_float = OpTypePointer Function %float
%float_n5 = OpConstant %float -5
%float_5 = OpConstant %float 5
-%int = OpTypeInt 32 1
-%int_0 = OpConstant %int 0
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
%int_2 = OpConstant %int 2
%int_1 = OpConstant %int 1
%_entrypoint = OpFunction %void None %14
@@ -83,21 +83,21 @@
OpBranchConditional %32 %27 %29
%27 = OpLabel
%34 = OpLoad %float %r
-%33 = OpExtInst %float %1 FAbs %34
-%35 = OpAccessChain %_ptr_Function_float %x %int_0
-OpStore %35 %33
-%38 = OpLoad %v4float %x
-%39 = OpCompositeExtract %float %38 0
-%41 = OpFOrdEqual %bool %39 %float_0
-OpSelectionMerge %43 None
-OpBranchConditional %41 %42 %43
-%42 = OpLabel
-OpBranch %29
+%33 = OpExtInst %float %1 FClamp %34 %float_0 %float_1
+%37 = OpAccessChain %_ptr_Function_float %x %int_0
+OpStore %37 %33
+%40 = OpLoad %v4float %x
+%41 = OpCompositeExtract %float %40 0
+%42 = OpFOrdEqual %bool %41 %float_0
+OpSelectionMerge %44 None
+OpBranchConditional %42 %43 %44
%43 = OpLabel
+OpBranch %29
+%44 = OpLabel
OpBranch %28
%28 = OpLabel
-%44 = OpLoad %float %r
-%46 = OpFAdd %float %44 %float_1
+%45 = OpLoad %float %r
+%46 = OpFAdd %float %45 %float_1
OpStore %r %46
OpBranch %25
%29 = OpLabel