Merge pull request #763 from OfficialR3ido101/fix/add_more_GPU_mem_options

Add more ram Options
This commit is contained in:
ksuprynowicz 2023-12-08 22:28:10 +01:00 committed by GitHub
commit 7f85b1f9f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 2 deletions

View file

@ -445,6 +445,10 @@ Menu::Menu() {
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture4096MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture6144MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture8192MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture10240MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture12288MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture16384MB, 0, false));
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture20480MB, 0, false));
connect(textureGroup, &QActionGroup::triggered, [textureGroup] {
auto checked = textureGroup->checkedAction();
auto text = checked->text();
@ -465,8 +469,16 @@ Menu::Menu() {
newMaxTextureMemory = MB_TO_BYTES(4096);
} else if (MenuOption::RenderMaxTexture6144MB == text) {
newMaxTextureMemory = MB_TO_BYTES(6144);
} else if (MenuOption::RenderMaxTexture8192MB == text) {
} else if (MenuOption::RenderMaxTexture1024MB == text) {
newMaxTextureMemory = MB_TO_BYTES(8192);
} else if (MenuOption::RenderMaxTexture10240MB == text) {
newMaxTextureMemory = MB_TO_BYTES(10240);
} else if (MenuOption::RenderMaxTexture12288MB == text) {
newMaxTextureMemory = MB_TO_BYTES(12288);
} else if (MenuOption::RenderMaxTexture16384MB == text) {
newMaxTextureMemory = MB_TO_BYTES(16384);
} else if (MenuOption::RenderMaxTexture20480MB == text) {
newMaxTextureMemory = MB_TO_BYTES(20480);
}
gpu::Texture::setAllowedGPUMemoryUsage(newMaxTextureMemory);
});
@ -775,7 +787,6 @@ Menu::Menu() {
addActionToQMenuAndActionHash(crashMenu, MenuOption::CrashOnShutdown, 0, qApp, SLOT(crashOnShutdown()));
}
// Developer > Show Statistics
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::Stats, 0, true);

View file

@ -175,6 +175,10 @@ namespace MenuOption {
const QString RenderMaxTexture4096MB = "4096 MB";
const QString RenderMaxTexture6144MB = "6144 MB";
const QString RenderMaxTexture8192MB = "8192 MB";
const QString RenderMaxTexture10240MB = "10240 MB";
const QString RenderMaxTexture12288MB = "12288 MB";
const QString RenderMaxTexture16384MB = "16384 MB";
const QString RenderMaxTexture20480MB = "20480 MB";
const QString RenderSensorToWorldMatrix = "Show SensorToWorld Matrix";
const QString RenderIKTargets = "Show IK Targets";
const QString RenderIKConstraints = "Show IK Constraints";