rsx: Implement relocatable vertex program constants for static programs [optimization] - #11691
Merged
Conversation
- 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
Contributor
|
8700K @5ghz seems to have given me more 4fps in Ratchet and Clank TOD's starting scene and in Saints Row IV |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










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.