libs/vkd3d: Return S_FALSE from D3D12CreateDevice() when device is NULL.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2018-07-19 14:47:42 +02:00
committed by Alexandre Julliard
parent 72859f8898
commit 9ce53b74df
2 changed files with 10 additions and 1 deletions

View File

@@ -1080,6 +1080,9 @@ static void test_create_device(void)
ok(hr == S_OK, "Failed to create device, hr %#x.\n", hr);
ID3D12Device_Release(device);
hr = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0, &IID_ID3D12Device, NULL);
ok(hr == S_FALSE, "Got unexpected hr %#x.\n", hr);
hr = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_9_1, &IID_ID3D12Device, (void **)&device);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
hr = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_9_2, &IID_ID3D12Device, (void **)&device);