Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualIrYoKu1

Posted 04 September 2013 - 12:37 PM

It seems you are right; in fact I think the way this is implemented is bogus.

 

I tried to get the first adapter available:

factory->EnumAdapters(0, &adapter)

Hoping it would always yield the GPU actually used. Doing it right in the beginning of the app worked out, but after DXUT initialization it was failing. I tracked down the problem and found this:

factory->EnumAdapters(0, &adapter); // Returns the adapter for the Intel card
D3D10CreateDevice(...); // Seems to be the first one in the app, when DXUT creates dummy devices for testing compatibility
factory->EnumAdapters(0, &adapter); // Returns the adapter for the NVIDIA card

So, doing it as I wrote in my first post (getting the adapter from the device) is not reliable, and trying to do in this other way (directly from first adapter ordinal) is also bogus. Unless this is done before device creation, you cannot rely on what you get from EnumAdapters.


#2IrYoKu1

Posted 04 September 2013 - 12:36 PM

It seems you are right; in fact I think the way this is implemented is very bogus.

 

I tried to get the first adapter available:

factory->EnumAdapters(0, &adapter)

Hoping it would always yield the GPU actually used. Doing it right in the beginning of the app worked out, but after DXUT initialization it was failing. I tracked down the problem and found this:

factory->EnumAdapters(0, &adapter); // Returns the adapter for the Intel card
D3D10CreateDevice(...); // Seems to be the first one in the app, when DXUT creates dummy devices for testing compatibility
factory->EnumAdapters(0, &adapter); // Returns the adapter for the NVIDIA card

So, doing it as I wrote in my first post (getting the adapter from the device) is not reliable, and trying to do in this other way (directly from first adapter ordinal) is also bogus. Unless this is done before device creation, you cannot rely on what you get from EnumAdapters.


#1IrYoKu1

Posted 04 September 2013 - 12:36 PM

It seems you are right; in fact I think the way this is implemented is very bogus.

 

I tried to get the first adapter available:

factory->EnumAdapters(0, &adapter)

Hoping it would always yield the GPU actually used. Doing it right in the beginning of the app worked out, but after DXUT initialization it was failing. I tracked down the problem and found this:

factory->EnumAdapters(0, &adapter); // Returns the adapter for the Intel card
D3D10CreateDevice(...); // Seems to be the first one in the app, when DXUT creates dummy devices for testing compatibility
factory->EnumAdapters(0, &adapter); // Returns the adapter for the NVIDIA card

So, doing it as I wrote in my first post (getting the adapter from the device) is not reliable, and trying to do in this other way (directly from first adapter ordinal) is also bogus. Unless this is done before device creation, you cannot rely on what you get from EnumAdapters.


PARTNERS