Mesa (master): pan/midgard: Fix scheduling mishap

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 26 15:39:10 UTC 2019


Module: Mesa
Branch: master
Commit: a99ecc2b2b65b61ed6c9f0880cab864733389f54
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a99ecc2b2b65b61ed6c9f0880cab864733389f54

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Thu Jul 25 14:53:20 2019 -0700

pan/midgard: Fix scheduling mishap

We shouldn't try to schedule onto a vmul if the last unit was a smul;
that would force a break ("traveling back in time").

total bundles in shared programs: 2519 -> 2472 (-1.87%)
bundles in affected programs: 791 -> 744 (-5.94%)
helped: 20
HURT: 0
helped stats (abs) min: 1 max: 9 x̄: 2.35 x̃: 1
helped stats (rel) min: 1.52% max: 11.76% x̄: 7.94% x̃: 7.69%
95% mean confidence interval for bundles value: -3.47 -1.23
95% mean confidence interval for bundles %-change: -9.36% -6.51%
Bundles are helped.

total quadwords in shared programs: 4028 -> 3965 (-1.56%)
quadwords in affected programs: 1223 -> 1160 (-5.15%)
helped: 17
HURT: 0
helped stats (abs) min: 1 max: 17 x̄: 3.71 x̃: 2
helped stats (rel) min: 2.97% max: 10.64% x̄: 6.97% x̃: 7.14%
95% mean confidence interval for quadwords value: -5.71 -1.70
95% mean confidence interval for quadwords %-change: -8.03% -5.91%
Quadwords are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>

---

 src/panfrost/midgard/midgard_schedule.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index c2a6d8b8e3f..1fe9f9461c1 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -256,7 +256,7 @@ schedule_bundle(compiler_context *ctx, midgard_block *block, midgard_instruction
                                                 if ((units & UNIT_SADD) && !(control & UNIT_SADD) && !midgard_has_hazard(segment, segment_size, ains))
                                                         unit = UNIT_SADD;
                                                 else if (units & UNIT_SMUL)
-                                                        unit = ((units & UNIT_VMUL) && !(control & UNIT_VMUL)) ? UNIT_VMUL : UNIT_SMUL;
+                                                        unit = ((units & UNIT_VMUL) && !(last_unit >= UNIT_VMUL)) ? UNIT_VMUL : UNIT_SMUL;
                                                 else if ((units & UNIT_VADD) && !(control & UNIT_VADD))
                                                         unit = UNIT_VADD;
                                                 else




More information about the mesa-commit mailing list