-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
[EmulGL] Software rendering performance can be significantly improved by optimising blend_pixel #261
Comments
Good catch! Is this x2 factor an estimate or did you already try? One thing you may be interested in is |
I've tested that on M1 Air with Apple Silicon, went from 120ms to 60ms per frame when I removed switch-case and kept only actual branch |
You will see that this test only involves black pixel on a flat surface. The idea was mainly to have a guess on sensitivity to number of pixels to paint vs. polygon you’re draw. One point worth mentioning : EmulGL has an unsatisfying way of handling blending. The less alpha you configure, the darker polygon you have. I’ll send you links about it. |
switch - case
insideblend_pixel
causes almost 2x performance degradation due to mixing of branching and numeric pipelinePipeline flame graph:
As
BlendFunc
rarely changes during polygon rendering, one can try to use lambdas to optimise pixel blending performanceThe text was updated successfully, but these errors were encountered: