Mesa (main): pan/bi: Enable dual texture fusing pass

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 12 16:47:45 UTC 2021


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

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Mon Nov  8 14:51:22 2021 -0500

pan/bi: Enable dual texture fusing pass

Everything is in place for it now -- ship it! Our Bifrost cycle model is
coarse, so take the shader-db results with a massive spoonful of salt:

total instructions in shared programs: 107504 -> 107252 (-0.23%)
instructions in affected programs: 39692 -> 39440 (-0.63%)
helped: 191
HURT: 1
helped stats (abs) min: 1.0 max: 20.0 x̄: 1.32 x̃: 1
helped stats (rel) min: 0.11% max: 9.52% x̄: 1.21% x̃: 0.98%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 2.04% max: 2.04% x̄: 2.04% x̃: 2.04%
95% mean confidence interval for instructions value: -1.60 -1.02
95% mean confidence interval for instructions %-change: -1.37% -1.01%
Instructions are helped.

total tuples in shared programs: 89864 -> 89664 (-0.22%)
tuples in affected programs: 27787 -> 27587 (-0.72%)
helped: 146
HURT: 6
helped stats (abs) min: 1.0 max: 17.0 x̄: 1.54 x̃: 1
helped stats (rel) min: 0.14% max: 15.38% x̄: 1.83% x̃: 1.25%
HURT stats (abs)   min: 1.0 max: 11.0 x̄: 4.17 x̃: 2
HURT stats (rel)   min: 0.54% max: 3.55% x̄: 1.29% x̃: 0.87%
95% mean confidence interval for tuples value: -1.64 -0.99
95% mean confidence interval for tuples %-change: -2.06% -1.36%
Tuples are helped.

total clauses in shared programs: 18253 -> 18044 (-1.15%)
clauses in affected programs: 5127 -> 4918 (-4.08%)
helped: 164
HURT: 1
helped stats (abs) min: 1.0 max: 19.0 x̄: 1.28 x̃: 1
helped stats (rel) min: 0.78% max: 28.57% x̄: 6.73% x̃: 5.88%
HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 2.94% max: 2.94% x̄: 2.94% x̃: 2.94%
95% mean confidence interval for clauses value: -1.50 -1.04
95% mean confidence interval for clauses %-change: -7.42% -5.91%
Clauses are helped.

total cycles in shared programs: 8118.54 -> 8103.88 (-0.18%)
cycles in affected programs: 414.96 -> 400.29 (-3.53%)
helped: 43
HURT: 27
helped stats (abs) min: 0.041665999999999315 max: 4.375 x̄: 0.41 x̃: 0
helped stats (rel) min: 0.24% max: 50.00% x̄: 11.49% x̃: 5.26%
HURT stats (abs)   min: 0.041665999999999315 max: 1.1666639999999973 x̄:
0.10 x̃: 0
HURT stats (rel)   min: 0.43% max: 4.71% x̄: 1.42% x̃: 1.28%
95% mean confidence interval for cycles value: -0.35 -0.07
95% mean confidence interval for cycles %-change: -9.50% -3.53%
Cycles are helped.

total arith in shared programs: 3375.67 -> 3376.42 (0.02%)
arith in affected programs: 345.29 -> 346.04 (0.22%)
helped: 24
HURT: 32
helped stats (abs) min: 0.041665999999999315 max: 0.5833329999999997 x̄:
0.09 x̃: 0
helped stats (rel) min: 0.24% max: 14.29% x̄: 2.82% x̃: 1.50%
HURT stats (abs)   min: 0.041665999999999315 max: 1.1666639999999973 x̄:
0.09 x̃: 0
HURT stats (rel)   min: 0.43% max: 4.71% x̄: 1.42% x̃: 1.28%
95% mean confidence interval for arith value: -0.04 0.07
95% mean confidence interval for arith %-change: -1.19% 0.39%
Inconclusive result (value mean confidence interval includes 0).

total texture in shared programs: 1275 -> 1157 (-9.25%)
texture in affected programs: 725.50 -> 607.50 (-16.26%)
helped: 192
HURT: 0
helped stats (abs) min: 0.5 max: 10.0 x̄: 0.61 x̃: 0
helped stats (rel) min: 2.86% max: 50.00% x̄: 25.20% x̃: 25.00%
95% mean confidence interval for texture value: -0.72 -0.51
95% mean confidence interval for texture %-change: -27.12% -23.27%
Texture are helped.

total vary in shared programs: 537.88 -> 536.12 (-0.33%)
vary in affected programs: 2.75 -> 1 (-63.64%)
helped: 1
HURT: 0

total quadwords in shared programs: 79762 -> 79681 (-0.10%)
quadwords in affected programs: 10261 -> 10180 (-0.79%)
helped: 59
HURT: 18
helped stats (abs) min: 1.0 max: 14.0 x̄: 1.88 x̃: 1
helped stats (rel) min: 0.38% max: 8.20% x̄: 1.95% x̃: 1.43%
HURT stats (abs)   min: 1.0 max: 4.0 x̄: 1.67 x̃: 1
HURT stats (rel)   min: 0.46% max: 8.89% x̄: 2.22% x̃: 1.21%
95% mean confidence interval for quadwords value: -1.57 -0.53
95% mean confidence interval for quadwords %-change: -1.59% -0.37%
Quadwords are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13723>

---

 src/panfrost/bifrost/bifrost_compile.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index db32337ffb8..29534a9f833 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -3806,6 +3806,13 @@ bifrost_compile_shader_nir(nir_shader *nir,
          * skip bit is a function of only the data flow graph and is invariant
          * under valid scheduling. */
         bi_analyze_helper_requirements(ctx);
+
+        /* Fuse TEXC after analyzing helper requirements so the analysis
+         * doesn't have to know about dual textures */
+        if (likely(optimize)) {
+                bi_opt_fuse_dual_texture(ctx);
+        }
+
         bi_validate(ctx, "Late lowering");
 
         bi_register_allocate(ctx);



More information about the mesa-commit mailing list