Skip to content
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

Fix newer Windows 10 awful performance with d3d9 software vertex processing #111

Closed
mirh opened this issue Jan 26, 2021 · 6 comments
Closed

Comments

@mirh
Copy link

mirh commented Jan 26, 2021

See Nucleoprotein/OneTweakNG#1 (comment)
https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dcreate
https://social.msdn.microsoft.com/Forums/en-US/a84dce94-49f4-4118-9e68-fe412c909ee4/directx-9-program-runs-terribly-after-win10-update-1607

Perhaps switching to mixed and hardware one may be already some solution (idk I'm not a dev), but if the original game devs didn't think to it my uneducated guess would be there was a legit reason.

@elishacloud
Copy link
Owner

Interesting. It looks like changing the vertex buffer to use system memory and switching the vertex processing to mixed mode solved the performance issues. Mixed mode processing is not normally recommended by Microsoft. But I suppose adding an option for this would be good.

@mirh
Copy link
Author

mirh commented Feb 28, 2021

I mean, to be fair, the last link could as well be just amd-specific.. they have been skimping on the d3d9 driver as of the last years in turn.
But nice for the option.

Assuming it actually ever was just for retrocompatibility, I wonder if it couldn't be safe to have all vertex processing be forced on hardware on say akk >DX10 or >SM3 gpus?

@mirh
Copy link
Author

mirh commented Mar 14, 2021

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451/diffs
Not exactly linked to the problem here, but I guess you might found interesting these behind the scenes factlets.

elishacloud added a commit that referenced this issue Apr 15, 2021
@mirh
Copy link
Author

mirh commented May 25, 2022

Mhh, so, I just got some testing (yes, sorry for the lazy ass)
But ForceMixedVertexProcessing doesn't really help much, while ForceSystemMemVertexCache totally nukes framerate.

Maybe forcing hardware processing could do it?

@elishacloud
Copy link
Owner

Forcing hardware processing should do it. But may also cause graphical issues is the hardware cannot support somethings. Though it should be less of an issue with d3d9, I think. There is already an option to ForceMixedVertexProcessing. I could create a new option to ForceHardwareVertexProcessing.

@mirh
Copy link
Author

mirh commented May 25, 2022

Not really sure what could be the point of forcing modes if it isn't to improve performance (also was there any specific reason behind ForceSystemMemVertexCache?), but maybe you could have a single option with an integer value rather than a boolean.

EDIT: nevermind, over at dxwnd they report quite the success with the flags. It's just that they are just a drop in the bucket compared to all the other changes.

@mirh mirh changed the title Fix Windows 10 awful performance with software vertex processing Fix newer Windows 10 awful performance with d3d9 Nov 14, 2022
@mirh mirh changed the title Fix newer Windows 10 awful performance with d3d9 Fix newer Windows 10 awful performance with d3d9 software vertex processing Nov 22, 2022
@mirh mirh closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants