Skip to content

v3d/compiler: do not emit extra thrsw on spilling

Juan A. Suárez requested to merge jasuarez/mesa:review/v3d-spill-tmu into main

On nir_to_vir the last thrsw (if any) is marked so when emitting the QPU code we know that two thrsw in a row must be emitted to flag the last thrsw.

But if we need to spill, it is possible that new thrsw signals need to be added. In this case, we are just emitting at the end an extra last thrsw so in the QPU two thrsw in a row are emitted.

But this breaks the valid conditions, that require any thrsw must be emitted when waiting for TMU or TSY. Which for this extra last thrsw is not the case.

Instead, just track the new emitted thrsw signals on the spilling, and mark the last one so in QPU the two thrsw in a row are emitted.

Fixes: #4760 (closed)

Merge request reports