Commit 2800970d authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

dxgi/tests: Add a small test for IDXGIAdapter::GetDesc().

parent 0491fcce
......@@ -98,6 +98,36 @@ static void test_device_interfaces(IDXGIDevice *device)
ok(SUCCEEDED(hr), "IDXGIDevice does not implement ID3D10Device\n");
}
static void test_adapter_desc(IDXGIDevice *device)
{
DXGI_ADAPTER_DESC desc;
IDXGIAdapter *adapter;
HRESULT hr;
hr = IDXGIDevice_GetAdapter(device, &adapter);
ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr);
hr = IDXGIAdapter_GetDesc(adapter, NULL);
ok(hr == E_INVALIDARG, "GetDesc returned %#x, expected %#x.\n",
hr, E_INVALIDARG);
hr = IDXGIAdapter_GetDesc(adapter, &desc);
ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr);
trace("%s.\n", wine_dbgstr_w(desc.Description));
trace("%04x: %04x:%04x (rev %02x).\n",
desc.SubSysId, desc.VendorId, desc.DeviceId, desc.Revision);
trace("Dedicated video memory: %lu (%lu MB).\n",
desc.DedicatedVideoMemory, desc.DedicatedVideoMemory / (1024 * 1024));
trace("Dedicated system memory: %lu (%lu MB).\n",
desc.DedicatedSystemMemory, desc.DedicatedSystemMemory / (1024 * 1024));
trace("Shared system memory: %lu (%lu MB).\n",
desc.SharedSystemMemory, desc.SharedSystemMemory / (1024 * 1024));
trace("LUID: %08x:%08x.\n", desc.AdapterLuid.HighPart, desc.AdapterLuid.LowPart);
IDXGIAdapter_Release(adapter);
}
static void test_create_surface(IDXGIDevice *device)
{
ID3D10Texture2D *texture;
......@@ -184,6 +214,7 @@ START_TEST(device)
return;
}
test_adapter_desc(device);
test_device_interfaces(device);
test_create_surface(device);
test_parents(device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment