pan/mdg: Analyze helper termination after scheduling

Similar to the fix in 6bf8e960fa ("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: 9a7f0e268b ("pan/mdg: Use the helper invo analyze passes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12156>
This commit is contained in:
Icecream95 2021-07-22 20:17:31 +12:00 committed by Marge Bot
parent e79a78a16f
commit a2b37e9592
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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 */