mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 20:30:12 +01:00
broadcom/compiler: only use last thread switch flag to detect final section
Since commit 'c98ddc778a3 broadcom/compiler: force a last thrsw for spilling' we always ensure we signal the last thread section explicitly with a last thread switch. Relying on VPM stores to detect the last thread section is particularly bad, because we can have VPM stores occurring quite early in a shader program, which would disable TMU spilling almost entirely. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22461>
This commit is contained in:
parent
dfdbf5bf94
commit
6114e66124
1 changed files with 5 additions and 4 deletions
|
|
@ -294,10 +294,6 @@ v3d_choose_spill_node(struct v3d_compile *c)
|
|||
if (inst->is_last_thrsw)
|
||||
started_last_seg = true;
|
||||
|
||||
if (v3d_qpu_writes_vpm(&inst->qpu) ||
|
||||
v3d_qpu_uses_tlb(&inst->qpu))
|
||||
started_last_seg = true;
|
||||
|
||||
/* Track when we're in between a TMU setup and the
|
||||
* final LDTMU or TMUWT from that TMU setup. We
|
||||
* penalize spills during that time.
|
||||
|
|
@ -310,6 +306,11 @@ v3d_choose_spill_node(struct v3d_compile *c)
|
|||
}
|
||||
}
|
||||
|
||||
/* We always emit a "last thrsw" to ensure all our spilling occurs
|
||||
* before the last thread section. See vir_emit_last_thrsw.
|
||||
*/
|
||||
assert(started_last_seg);
|
||||
|
||||
for (unsigned i = 0; i < c->num_temps; i++) {
|
||||
if (BITSET_TEST(c->spillable, i)) {
|
||||
ra_set_node_spill_cost(c->g, temp_to_node(i),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue