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

Implemented vram limit #23

Merged
merged 16 commits into from
Jul 7, 2023
Merged

Implemented vram limit #23

merged 16 commits into from
Jul 7, 2023

Conversation

kruemmelbande
Copy link
Contributor

It uses the nvidia api, so it will probably not work with amd or intel graphics cards, and the limit behaviour isnt quite perfect yet, however, as a proof of concept, this works pretty good.

@Crimson-foxGITHUB
Copy link
Contributor

Attempting to use VRAM-limiting in this way has some problems, such as the fact that a game could shoot up in VRAM usage during certain scenes.

@kruemmelbande
Copy link
Contributor Author

kruemmelbande commented Jun 26, 2023

Yes, this might not be perfect, however, without a vram limit, it can sometimes scale the resolution beyond what the vram can handle, and then just run at 20fps or so. I tried this version, and it runs a lot smoother, than the official build.
I mean, yes, VRAM usage of games is dynamic, however, this project has the purpose of taking a game with dynamic resource usage. That's the entire point of this project.

@Crimson-foxGITHUB
Copy link
Contributor

Yes, this might not be perfect, however, without a vram limit, it can sometimes scale the resolution beyond what the vram can handle, and then just run at 20fps or so. I tried this version, and it runs a lot smoother, than the official build. I mean, yes, VRAM usage of games is dynamic, however, this project has the purpose of taking a game with dynamic resource usage. That's the entire point of this project.

🤔 🤔 🤔 🤔 what if there was a toggle to enable or disable this?

also don't forget about settings.ini config.

@kruemmelbande
Copy link
Contributor Author

kruemmelbande commented Jun 26, 2023

You can just set the target and limit to 100%, and it should just act as disabled. Both of those are already in the settings.ini. I might add a toggle for it, however, i dont currently see the need for it that much.

Edit: actually, adding a toggle might prevent issues with intel and amd users, as i dont know the behaviour of nvidias api on that platform, so i will look into that.

@Erimelowo Erimelowo self-requested a review June 26, 2023 21:12
Copy link
Owner

@Erimelowo Erimelowo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good code-wise and compilation-wise, I just need to test it in-game ^^

As a side note, CI has been running for 17mins and going... ;-;

@Erimelowo
Copy link
Owner

I'm using the C/C++ default VSC formatter project-wide btw

@Erimelowo
Copy link
Owner

I hope you didn't mind me committing directly to your branch! :p
Thanks for your contribution, I will making a release candidate now ^^

@Erimelowo Erimelowo merged commit b2c0f16 into Erimelowo:main Jul 7, 2023
1 check passed
@Erimelowo
Copy link
Owner

@Erimelowo
Copy link
Owner

Oopsie woopsie, this seems to have introduced a huge memory leak ;-;

@Erimelowo
Copy link
Owner

Fixed in 2c894ff and 0.3.1

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

Successfully merging this pull request may close these issues.

3 participants