#Force usage of the dedicated GPU than the Integrated Graphics.

1 messages · Page 1 of 1 (latest)

brittle narwhal
#

after being stumbled on why the performance of my game was so crappy after adding FX Layers i figured out that, on my laptop atleast, gamemaker uses the integrated gpu of my laptop instead of the dedicated gpu.

is it possible to force usage of the dedicated GPU? i don't really want to tell the player to mess with their nvidia/amd system settings in order to get my game working properly.

tidal sapphire
#

There technically is a way to allow your game to utilise the dedicated gpu automatically, but there’s two caveats

#
  1. Your game must be compiled in YYC.
  2. You must modify your YYGML.h file, every time you update your runtime.
#

Which isn’t really that convenient, especially if you just want to test it often in VM

#

There is some other ways of doing something similar, one via a CLI tool to inject the exact headers. And I have built a build script that can do this automatically on every build, for YYC

#

I also don’t have it uploaded anywhere

carmine robin
#

that sounds like it would be a huge help for anyone with this issue

tidal sapphire
#

Yeahhh I mean tbh this doesn’t cover VM

#

I think I have it setup for export

#

But during testing you use the runtime runner

carmine robin
#

yeah still not great for troubleshooting

tidal sapphire
#

So there’s really no point, unless you patch the VM runner for each runtime

#

Exactly

#

nik originally shared this one

brittle narwhal
#

ive seen the official article about how to do that in YYC, not entirely sure if thatll help me as the game uses VM and im not sure how much i have to change when i wanna transition over to YYC 😅

ill look into nvpatch. I would just apply the patch every time i build the game.

for debugging or running the game straight from the IDE i am just setting the nvidia settings to use the GPU of mine.

tidal sapphire
#

Right well for VM, the only way you can get it to update every time is if you either change your nvidia settings, or patch it on every single runtime update

#

For exporting you can automate it

#

I’ll see if I can find an upload

#

@brittle narwhal it’s been a hot minute, but I believe I do have a workaround included here for debugging with VM within the extension options

#

You just need this installed on your end

brittle narwhal
#

huh interesting. So the log within Gamemaker stated that nvpatch ran and it returned OK. Once i started the game it still used the IGPU. when i manually patched the .exe it worked and used the GPU.

tidal sapphire
brittle narwhal
#

yes :/

#

Manually Patched:

tidal sapphire
#

Lol

#

Yeah okay something went wrong there

#

It’s not an exact science

#

Especially since I don’t have access to an iGPU/dGPU system

#

So it’s kind of hard to fix it

brittle narwhal
#

Yeaaa hahahaha, all good nw. i will just patch it manually :3

ill take a look into the .bats. maybe i can find something :)

tidal sapphire
#

If you can tinker/get it working on your end, feel free to send me the edits back

#

It’s the only thing stopping me from just giving it out publicly

brittle narwhal
#

will do! :)

tidal sapphire
#

🫡

brittle narwhal
#

@tidal sapphire Okay got it.

i realized that the executeable within the Temporary folder was indeed patched but the zipped project wasn't.

so i just changed post_package_step.bat -> pre_package_step.bat.

now the game gets built with the patched version in the zip :)

tidal sapphire
#

Ah yes

#

An easy fix

#

Thank you for your effort

brittle narwhal
#

no prob ^^

tidal sapphire
#

Do you have a GitHub username I could credit?

brittle narwhal
#

yeop hold on! should also be Kl3XY but lemme check