HeavenWu / slimdx

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

DirectX 11 Device.GetSupportedFeatureLevel always fails #662

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The call to D3D11CreateDevice in GetSupportedFeatureLevel always fails due
to incorrect parameters.

From MSDN:
"In Direct3D 11, if you are trying to create a hardware or a software
device, set pAdapter != NULL which constrains the other inputs to be:

    * DriverType must be D3D_DRIVER_TYPE_UNKNOWN
    * Software must be NULL.

On the other hand, if pAdapter == NULL, the DriverType cannot be set to
D3D_DRIVER_TYPE_UNKNOWN;"

By changing D3D_DRIVER_TYPE_UNKNOWN to D3D_DRIVER_TYPE_HARDWARE, the
correct feature level is reported back (being the highest if no list of
feature levels is passed, or the first supported feature level in the
list). This was tested on Windows 7 x64 with an ATI HD5850.

Note: This was mentioned by michael.precise in issue 532. But the issue was
closed and set to invalid prior to the interesting comments, so I suspect
they went by unnoticed.

Original issue reported on code.google.com by jorge...@gmail.com on 30 Apr 2010 at 9:30

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r1553.

Original comment by Mike.Popoloski on 30 Apr 2010 at 7:26