[PATCH 4/5] d3d11/tests: Port test_create_texture2d() from d3d10core.

Henri Verbeet hverbeet at gmail.com
Fri Aug 28 06:49:03 CDT 2015


On 28 August 2015 at 00:39, Józef Kucia <jkucia at 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.



More information about the wine-devel mailing list