-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
4x~9x VBO generating/uploading performance improvement #1733
base: master
Are you sure you want to change the base?
Conversation
It crashes for me on Win32 for some reason |
Ok, I can test it. |
@SNMetamorph I found the bug, I forgot to allocate It should be fine now but it's better to test it anyway. |
@SNMetamorph PHS building should be unrelated to these changes. Does it take this much time on master branch? |
For some mystery reason, for consequent attempts PHS generating was not happended at all. On both master and this branches. |
@SNMetamorph check you're on the latest version, because the initial version had a memory corruption due to indexarray being uninitialized. PHS is being generated only in multiplayer. |
Yeah, this issue does not related to this PR at all. Also I checked configure logs and found out that OpenMP build was disabled. Perhaps this is what causes issue. |
OpenMP is experimental and disabled by default for everyone. I only enable it on my server for faster changelevels. |
Ok, I created separate issue #1734 for this |
There is another memory corruption |
4c9b4dd#diff-ac259cfe5ed4d16d996cac0f44bdae69a9a3eea21b0a271b7c043eb886f31b06L1917
Where is vbotex vboarray linkedlist chain? When one texture belongs to
two arrays, it will lost some surfaces
|
While looking into
R_GenerateVBO
function, I noticed that it wastes a lot of time checking the same data again and again. After reordering loops by excluding useless surfaces first, level loading times were significantly improved.I didn't notice any regressions, but FPS was unexpectedly improved as well, though within margin of error. By comparing log on heavy maps like
ad_sepulcher.bsp
VBOs got reordered. Not sure what could've caused it, so asking @mittorn for review, since he probably knows his own code better.All comparisons were made on AMD Ryzen 2600X and NVIDIA GeForce GTX 1070 with engine compiled with default build configuration + bsp2 support.
Attaching loading ad_sepulcher.bsp log before and after the patch:
before
after
FPS before and after the patch: 137-140 and 140-145.
On smaller map like disposal.bsp 0.586 and 0.0231 seconds were wasted on VBO, but there was no any frametime difference.
Hazard Course timedemo:
before
after
Though fps difference might be caused by overall better loading times here.