pcsx2
pcsx2 copied to clipboard
GS/HW: Remove targets when invalidate area covers valid area
Description of Changes
Check if this write/draw covers the entire target, and erase it early if so. No point keeping targets which are fully dirtied around.
Rationale behind Changes
Making the target list a bit smaller.
Suggested Testing Steps
Check games sensitive to invalidation which also use tex-in-rt. I haven't done a runner pass yet.
Hold merge for now, it causes a regression in Jak games. Sky procedural draw gets confused for a sprite draw, which ends up killing the target, and it doesn't get preloaded with the first mistaken draw when the second happens on-GPU.
Seems fine now, the translated case was already doing this, it was only for surface offsets.