From: Nikolay Sivov nsivov@codeweavers.com
DXGI currently marks all adapters as 'hardware' too.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dxcore/dxcore.c | 7 +++++++ dlls/dxcore/tests/dxcore.c | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/dxcore/dxcore.c b/dlls/dxcore/dxcore.c index def592480b4..184610b9291 100644 --- a/dlls/dxcore/dxcore.c +++ b/dlls/dxcore/dxcore.c @@ -109,12 +109,14 @@ static HRESULT dxcore_adapter_get_property_size(struct dxcore_adapter *adapter, { [InstanceLuid] = sizeof(LUID), [HardwareID] = sizeof(DXCoreHardwareID), + [IsHardware] = sizeof(BYTE), };
switch (property) { case InstanceLuid: case HardwareID: + case IsHardware: *size = property_sizes[property]; return S_OK;
@@ -159,6 +161,11 @@ static HRESULT STDMETHODCALLTYPE dxcore_adapter_GetProperty(IDXCoreAdapter *ifac break; }
+ case IsHardware: + FIXME("Returning all adapters as Hardware.\n"); + *(BYTE *)buffer = 1; + break; + default: break; } diff --git a/dlls/dxcore/tests/dxcore.c b/dlls/dxcore/tests/dxcore.c index eb7157249e7..108767393bf 100644 --- a/dlls/dxcore/tests/dxcore.c +++ b/dlls/dxcore/tests/dxcore.c @@ -229,24 +229,24 @@ static void test_GetProperty(void) hr = IDXCoreAdapter_GetProperty(adapter, IsHardware, 0, NULL); ok(hr == E_POINTER, "Got hr %#lx.\n", hr); hr = IDXCoreAdapter_GetProperty(adapter, IsHardware, 0, &is_hardware); - todo_wine ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr); + ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, IsHardware, NULL); ok(hr == E_POINTER, "Got hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, IsHardware, &size); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(size == sizeof(is_hardware), "Got property size.\n"); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(size == sizeof(is_hardware), "Got property size.\n");
is_hardware = 3; hr = IDXCoreAdapter_GetProperty(adapter, IsHardware, sizeof(is_hardware), &is_hardware); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(is_hardware == 0 || is_hardware == 1, "Got value %d.\n", is_hardware); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(is_hardware == 0 || is_hardware == 1, "Got value %d.\n", is_hardware);
dummy = 0; hr = IDXCoreAdapter_GetProperty(adapter, IsHardware, sizeof(dummy), &dummy); - todo_wine ok(hr == S_OK, "Got hr %#lx.\n", hr); - todo_wine ok(dummy == is_hardware, "Got value %#x.\n", dummy); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + ok(dummy == is_hardware, "Got value %#x.\n", dummy);
IDXCoreAdapter_Release(adapter); }