Mesa (main): pan/mdg: Analyze helper termination after scheduling
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Aug 1 22:56:31 UTC 2021
Module: Mesa
Branch: main
Commit: a2b37e95926f52b597dd0cf440092bd296efa434
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a2b37e95926f52b597dd0cf440092bd296efa434
Author: Icecream95 <ixn at disroot.org>
Date: Thu Jul 22 20:17:31 2021 +1200
pan/mdg: Analyze helper termination after scheduling
Similar to the fix in 6bf8e960faa ("pan/bi: Do helper termination
analysis on clauses")
Though apparently a "theoretical issue only", fixes artefacts in
DarkPlaces with both D3D9 and GL renderers.
Fixes: 9a7f0e268b7 ("pan/mdg: Use the helper invo analyze passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12156>
---
src/gallium/drivers/panfrost/ci/traces-panfrost.yml | 6 +++---
src/panfrost/midgard/midgard_compile.c | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/panfrost/ci/traces-panfrost.yml b/src/gallium/drivers/panfrost/ci/traces-panfrost.yml
index 3d439648625..a75dea3d6ee 100644
--- a/src/gallium/drivers/panfrost/ci/traces-panfrost.yml
+++ b/src/gallium/drivers/panfrost/ci/traces-panfrost.yml
@@ -45,7 +45,7 @@ traces:
- path: gputest/furmark.trace
expectations:
- device: gl-panfrost-t860
- checksum: 2bde9efdddd92c28d29f744e36a226e9
+ checksum: 6540f71b1c051ba82af2a25b93065f34
- path: gputest/triangle.trace
expectations:
- device: gl-panfrost-t860
@@ -55,7 +55,7 @@ traces:
- path: humus/Portals.trace
expectations:
- device: gl-panfrost-t860
- checksum: f83da726bff354684a576effa74ef681
+ checksum: ad04db74ea70b7772719080f8a4c499b
- device: gl-panfrost-t760
# Wrong rendering, many elements are missing
checksum: 67db7302b28cb8e3e217cc79b672af79
@@ -213,7 +213,7 @@ traces:
- path: humus/AmbientAperture.trace
expectations:
- device: gl-panfrost-t860
- checksum: 20492edd94ea94ba73013a4ee14285b7
+ checksum: e4c0b930ef99f14305e1ade7f1779c09
- path: humus/CelShading.trace
expectations:
- device: gl-panfrost-t860
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index a8dc872d31b..183e2991497 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -3173,13 +3173,15 @@ midgard_compile_shader_nir(nir_shader *nir,
/* Analyze now that the code is known but before scheduling creates
* pipeline registers which are harder to track */
- mir_analyze_helper_terminate(ctx);
mir_analyze_helper_requirements(ctx);
/* Schedule! */
midgard_schedule_program(ctx);
mir_ra(ctx);
+ /* Analyze after scheduling since this is order-dependent */
+ mir_analyze_helper_terminate(ctx);
+
/* Emit flat binary from the instruction arrays. Iterate each block in
* sequence. Save instruction boundaries such that lookahead tags can
* be assigned easily */
More information about the mesa-commit
mailing list