GSVertexTrace::FindMinMax improvements#3940
Merged
refractionpcsx2 merged 4 commits intoPCSX2:masterfrom Nov 3, 2021
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Member
Author
Curious, after this patch, are clang builds slower than gcc builds here? |
|
@iMineLink or @gregory38 might be able to help review this pull request. |
This comment has been minimized.
This comment has been minimized.
11d1e38 to
5a40c7c
Compare
Contributor
|
I'd add a prefix to the newest commit |
5a40c7c to
1f844e9
Compare
1f844e9 to
2b79c72
Compare
Contributor
|
Would be nice to rename GSdx to GS in commit names as GS was merged. |
21ed40b to
2a51f2e
Compare
2a51f2e to
0776ab7
Compare
Why repeat things when you can make the compiler repeat them for you
They were the same speed or slower than full div on IvyBridge+ and Bulldozer+
0776ab7 to
d90b6f4
Compare
Member
|
Been messing with this (while reimplementing the CLAMP optimisation), it looks good to me, everything seems to work good :) Edit: There is a bug, will tell you about it on discord Edit2: Nope, it was VS screwing me over, the PR is fine. |
refractionpcsx2
approved these changes
Oct 21, 2021
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.
when you spend a bunch of time optimizing a function because you think it accounts for 30% of runtime but that was actually due to the compiler being stupid and not issues with the algorithm
This PR contains the following changes:
Run per-vertex instead of per-primitive for all things that need to apply to all vertices of a primitive anyways (prevents double-checking vertices in triangle strips, and also reduces pointer chases in the main loop)This broke stuffThere seems to be a check ofReason found, added as commentaccurate_stqwhen the OGL backend is deciding whether to use geometry shaders to process sprites, does anyone know if that's important or just something someone threw in there that's okay to remove?In the end, ignoring clang issues, GSVertexTrace::FindMinMax goes from taking about 3% of MTGS thread runtime to 1.5% on my computer. (Most of the time was spent doing OpenGL things so if you have a more efficient OpenGL driver it might make more of a difference for you)