Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Missing device creation with adapter and driver type #678

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'am enumerating all graphic adapter and then want to check if each adapter 
is supporting Direct3D 11 feature level and hardware driver type (like with 
C++). But it seem that the Direct3D11.Device constructor doesn't allow us to 
specify both DriverType and Adapter, is we specify DriverType we automatically 
use the adapter 0. 

Am I missing something ?

Original issue reported on code.google.com by Karna...@gmail.com on 25 May 2010 at 4:21

GoogleCodeExporter commented 9 years ago
Read the bottom of this page
http://msdn.microsoft.com/en-us/library/ff476082%28VS.85%29.aspx

It explains the rules for valid adapter, driver type inputs.

Original comment by Frassle on 25 May 2010 at 7:27

GoogleCodeExporter commented 9 years ago
The overloads are specifically set up this way to avoid allowing you to pass 
invalid
parameters. The reasons are listed in Frassle's link.

Original comment by Mike.Popoloski on 25 May 2010 at 10:10

GoogleCodeExporter commented 9 years ago
Yes, you are perfectly right, thank for the link.

So it explain why a part of the code in DXUT (DXUTDevice11.cpp - 
CD3D11Enumeration::EnumerateDevices function) is commented out, because they 
where 
trying to create a device with a non null adapter and a hardware driver type 
which 
will always fail as explained in the link above...

On another hand, it also mean that this function is obsolete because it's 
supposed to 
test the adapter passed as parameter with each driver type but it only test a 
NULL  
adapter.

(I am trying to rewrite DXUT under SlimDX that's for the story of my issue ^^)

Original comment by Karna...@gmail.com on 27 May 2010 at 4:13