On Tue, 17 Mar 2020 at 12:16, Zhiyi Zhang zzhang@codeweavers.com wrote:
- for (adapter_idx = 0; adapter_idx < adapter_count; ++adapter_idx) {
skip("Failed to create a D3D device.\n");
IDirect3D8_Release(d3d);
DestroyWindow(window);
return;
/* Test IDirect3D8_GetDeviceCaps */
hr = IDirect3D8_GetDeviceCaps(d3d, adapter_idx, D3DDEVTYPE_HAL, &caps);
ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "Adapter %u: GetDeviceCaps failed, hr %#x.\n",
adapter_idx, hr);
if (hr == D3DERR_NOTAVAILABLE)
{
skip("Adapter %u: No Direct3D support, skipping test.\n", adapter_idx);
break;
}
ok(caps.AdapterOrdinal == adapter_idx, "Adapter %u: Got unexpected adapter ordinal %u.\n",
adapter_idx, caps.AdapterOrdinal);
/* Test IDirect3DDevice8_GetDeviceCaps */
device_desc.adapter_ordinal = adapter_idx;
device = create_device(d3d, window, &device_desc);
ok(!!device, "Adapter %u: Failed to create a D3D device.\n", adapter_idx);
hr = IDirect3DDevice8_GetDeviceCaps(device, &caps);
ok(SUCCEEDED(hr), "Adapter %u: Failed to get caps, hr %#x.\n", adapter_idx, hr);
This crashes with the "gdi" renderer:
device.c:8884: Test failed: Adapter 0: Failed to create a D3D device. wine: Unhandled page fault on read access to 00000000 at address 0040EF16 (thread 0009), starting debugger... ... 8885 hr = IDirect3DDevice8_GetDeviceCaps(device, &caps);