-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vectorize uniform inputs #1664
Vectorize uniform inputs #1664
Conversation
9a8eed4
to
7559958
Compare
if (not update_off.used) { | ||
// Uniform value has not been set | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This worries me currently. If all uniforms are set, this should be fine as use
would always be true
and branch prediction should not be that bad. But if this is only a partial update, then this could get very slow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've solved this by storing the used IDs in an additional vector. This adds an additional lookup but should avoid pipeline flushes.
It's hard to say what the impact of a mispredicted branch would be, so we could change this back in the future if it turns out to only have a marginal effect.
1cc693c
to
93896f2
Compare
93896f2
to
b8a12ff
Compare
Vectorizes parts of the renderer to increase the speed of the uniform setting and updating.
The changes so far resulted in a
40%70% increase in FPS for me in stresstest 0.740880 FPS