Skip to content

pan/mdg: Spilling fixes

Icecream95 requested to merge icecream95/mesa:spill-fix into main

Turns out the bug that I only hit by "forcing spilling to run more times than needed" actually was the same as the real issue I was trying to debug, though I didn't notice that because there was a second bug that got hit as well, and a bug appearing when spilling increases from 256 bytes is so obviously caused by the tls_size getting set wrong…


Fill from TLS before spilling non-SSA nodes, otherwise the data already written to the node will get overwritten.

Fix reading a spilt register in the bundle it's written:

Read directly from the instruction getting spilt. Otherwise a fill will be inserted before the spill writing the value, so the instruction reading the spilt value gets garbage data.

Insert a move instruction, as the spill needs the value in a LD/ST register such as AL0, while the ALU instruction reading the value needs it in a work register such as R0.

Closes: #4857 (closed)

Merge request reports