rsx/vk: Implement hardware instancing#16466
Conversation
- This whole decompiler mess needs a rewrite
|
This update seems to cause large patches of instances to blink out of existence at certain angles in Resistance: Fall of Man, the Ratchet & Clank games seem to still work just fine though: RFOMShrubBlinking.mp4 |
|
@JimScript Dump RSX capture when it is invisible if possible and another when it is visible. If possible with the most minimal camera movement possible. |
|
Ok... Foliage appear: |
|
@JimScript @digant73 The issue should be fixed now. Please compare the new version with the previous one when it builds (or you compile from source) in terms of CPU+GPU load and performance. There shouldn't be any performance regressions unless the image was broken before (e.g missing foliage). |
|
the issue on trees is fixed now with no performance regression. Compared to current rpcs3 release, fps and gpu usage are now better (more fps with less gpu usage) in some places (as in my previous screenshot) where there were fps drops. CPU usage in this PR is the same as in current rpcs3 release (even where the current rpcs3 release is affected by fps drops). Other games (killzone, R3, R2 etc.) seem to be not affected by any performance regression. |
|
Well it seems like Resistance is fixed and the performance still has the same amazing uplift as it did before. |
|
I also confirm the improvements are present on recent GPUs (RTX 4060 in my case). Less GPU usage and more FPS in scenarios with foliage in |
This comment has been minimized.
This comment has been minimized.
|
This PR has already been merged, please don't add comments here. If there's a problem caused by this work, please open an issue ticket instead with logs for investigation. |



Relates to #15507 (comment)
Instead of a single draw + buffer command to patch constant, we implement hw instancing for sets that only change the constant registers (basically traditional transform instancing). This method is much faster than the fallback that uses a fixed buffer and emits barriers + update commands. Practically quadruples performance on NVIDIA cards in R&C tools of destruction (I don't know other games using instancing).
Also refactors the core RSX thread instead of just piling unrelated crap together. See #15424
P.S - OpenGL implementation will come later, I ran out of steam before I could work on that. Fortunately 95% of the work is already done.