Skip to content

rsx: Implement relocatable vertex program constants for static programs [optimization] - #11691

Merged
kd-11 merged 7 commits into
RPCS3:masterfrom
kd-11:vp-next
Mar 26, 2022
Merged

rsx: Implement relocatable vertex program constants for static programs [optimization]#11691
kd-11 merged 7 commits into
RPCS3:masterfrom
kd-11:vp-next

Conversation

@kd-11

@kd-11 kd-11 commented Mar 25, 2022

Copy link
Copy Markdown
Contributor

For non-skinning shaders, there is rarely any use of dynamic memory indexing (using a variable to calculate address). Instead, in most cases the non-uniform input comes in from the vertex attributes and the vertex program has a simple memory access pattern after compilation. Vertex programs have about 8KB of program memory we need to update every time the program is changed, but if the program has static memory addressing, the actual bits that will be consumed are known beforehand. We can therefore relocate the addresses and "pack" the data for each vertex program instead of updating a huge 8KB block each time. With this setup, the 8KB of updates shrinks down to a few dozen bytes per program which is significantly faster. Gives upto ~10% performance uplift in RSX-constrained scenarios.

kd-11 added 7 commits March 25, 2022 20:36
- If no vc[] refs exist, do not upload anything!
- Since each program now does a remap of the outputs, we need to reupload the constants
- This is not a loss, constants are almost always changing between draw calls anyway
- NV requires some very large alignment thresholds
@LoweysLitsman

Copy link
Copy Markdown
Contributor

8700K @5ghz seems to have given me more 4fps in Ratchet and Clank TOD's starting scene and in Saints Row IV

R&C ToD

Master
ToDMaster01

PR
TodPR01

Saints Row IV

Master
SRIVMaster

PR
SRIVPR

@Xcedf

Xcedf commented Mar 26, 2022

Copy link
Copy Markdown

Some real nice speedup I have in Infamous
master:
2
PR:
3

@Asinin3

Asinin3 commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

Skate 2 Improved by 4fps, and Sly Thieves in Time by 6fps with this change users with lower-end hardware (more GPU limited than my 3080) saw a much larger improvement in Sly (10-15FPS!!). Would be nice if more people could test these changes so we know what games improved for a potential upcoming announcement.
Skate 2 Before mp4-00 00 38 433-#1
Skate 2 After relocate mp4-00 00 48 183-#1

Sly 4 Before 1 mp4-00 00 37 500-#1
Sly 4 After 1 mp4-00 00 00 000-#1

@kd-11
kd-11 deleted the vp-next branch April 12, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants