Re: [PATCH 4/5] d3d11/tests: Port test_create_texture2d() from d3d10core.
On 28 August 2015 at 00:39, Józef Kucia <jkucia(a)codeweavers.com> wrote:
+static ID3D11Device *create_default_device(void) +{ + ID3D11Device *device; + + if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION, + &device, NULL, NULL))) + return device; + if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_WARP, NULL, 0, NULL, 0, D3D11_SDK_VERSION, + &device, NULL, NULL))) + return device; + if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_REFERENCE, NULL, 0, NULL, 0, D3D11_SDK_VERSION, + &device, NULL, NULL))) + return device; + + return NULL; +} + I think I'd make the "feature_level" parameter to the existing create_device() a pointer, and then make it optional. See also e.g. create_device() in dlls/d3d9/tests/device.c.
participants (1)
-
Henri Verbeet