~duangle/scopes

2 2

nvidia optimus support in scopes

Daniel Borges <dborges@lywenn.eu.org>
Details
Message ID
<c07e2e51-5a3f-e0aa-818b-45a8dcf62a90@lywenn.eu.org>
DKIM signature
missing
Download raw message
Hello,

I finally found out why Tukan wasn't running on my laptop. Tukan needs 
OpenGL 4.5 and my laptop's intel GPU only supports up to 4.2. 
Fortunately, my laptop also has an nVidia GPU that supports 4.5. There 
are several ways of making programs use it: 
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf

I ended up adding the following line to scopes' main.cpp.

extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;

That probably isn't the best solution though but considering the dynamic 
nature of scopes, I don't really know how to handle this.

One thing I noticed though is that, contrary to what states the above 
link, the value of NvOptimusEnablement doesn't matter. Even if it's 
zero, the GPU will be used. So it's value can't be used to 
enable/disable the feature...

Regards,

-- 
Daniel Borges
Game Developer
+33 6 11 92 32 84
http://pawarumi.com
Details
Message ID
<CAEjO-TtOoWYY=0T_3DJ60xvAp2O8OyF+TjcmerDWRzbrR7RHKA@mail.gmail.com>
In-Reply-To
<c07e2e51-5a3f-e0aa-818b-45a8dcf62a90@lywenn.eu.org> (view parent)
DKIM signature
missing
Download raw message
Sounds like a good workaround.

Would there anything speak against always linking this symbol into the
executable?

Leonard

On Mon, Jun 15, 2020 at 11:44 AM Daniel Borges <dborges@lywenn.eu.org> wrote:
>
> Hello,
>
> I finally found out why Tukan wasn't running on my laptop. Tukan needs
> OpenGL 4.5 and my laptop's intel GPU only supports up to 4.2.
> Fortunately, my laptop also has an nVidia GPU that supports 4.5. There
> are several ways of making programs use it:
> http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
>
> I ended up adding the following line to scopes' main.cpp.
>
> extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
>
> That probably isn't the best solution though but considering the dynamic
> nature of scopes, I don't really know how to handle this.
>
> One thing I noticed though is that, contrary to what states the above
> link, the value of NvOptimusEnablement doesn't matter. Even if it's
> zero, the GPU will be used. So it's value can't be used to
> enable/disable the feature...
>
> Regards,
>
> --
> Daniel Borges
> Game Developer
> +33 6 11 92 32 84
> http://pawarumi.com
Daniel Borges <dborges@lywenn.eu.org>
Details
Message ID
<68eb051f-9403-94b0-9566-9128f36986bd@lywenn.eu.org>
In-Reply-To
<CAEjO-TtOoWYY=0T_3DJ60xvAp2O8OyF+TjcmerDWRzbrR7RHKA@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
It would always enable the nVidia GPU. For a game engine like tukan, 
that sounds like the right thing to do. (unity does it)

However, for any app that doesn't use the GPU or that would be fine with 
the integrated intel one, it would yield higher power consumption and 
thus lower battery life. :/

Le 15/06/2020 à 12:44, Leonard Ritter a écrit :
> Sounds like a good workaround.
>
> Would there anything speak against always linking this symbol into the
> executable?
>
> Leonard
>
> On Mon, Jun 15, 2020 at 11:44 AM Daniel Borges <dborges@lywenn.eu.org> wrote:
>> Hello,
>>
>> I finally found out why Tukan wasn't running on my laptop. Tukan needs
>> OpenGL 4.5 and my laptop's intel GPU only supports up to 4.2.
>> Fortunately, my laptop also has an nVidia GPU that supports 4.5. There
>> are several ways of making programs use it:
>> http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
>>
>> I ended up adding the following line to scopes' main.cpp.
>>
>> extern "C" _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
>>
>> That probably isn't the best solution though but considering the dynamic
>> nature of scopes, I don't really know how to handle this.
>>
>> One thing I noticed though is that, contrary to what states the above
>> link, the value of NvOptimusEnablement doesn't matter. Even if it's
>> zero, the GPU will be used. So it's value can't be used to
>> enable/disable the feature...
>>
>> Regards,
>>
>> --
>> Daniel Borges
>> Game Developer
>> +33 6 11 92 32 84
>> http://pawarumi.com

-- 
Daniel Borges
Game Developer
+33 6 11 92 32 84
http://pawarumi.com
Reply to thread Export thread (mbox)