diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 1aa5e8b835e..722b5aa9d26 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -1007,9 +1007,12 @@ static void STDMETHODCALLTYPE d3d10_device_RSGetScissorRects(ID3D10Device1 *ifac static HRESULT STDMETHODCALLTYPE d3d10_device_GetDeviceRemovedReason(ID3D10Device1 *iface) { - FIXME("iface %p stub!\n", iface); + TRACE("iface %p.\n", iface); - return E_NOTIMPL; + /* In the current implementation the device is never removed, so we can + * just return S_OK here. */ + + return S_OK; } static HRESULT STDMETHODCALLTYPE d3d10_device_SetExceptionMode(ID3D10Device1 *iface, UINT flags) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 8fb62a000eb..d761dae1979 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -880,6 +880,27 @@ static void test_create_predicate(void) ok(!refcount, "Device has %u references left.\n", refcount); } +static void test_device_removed_reason(void) +{ + ID3D10Device *device; + ULONG refcount; + HRESULT hr; + + if (!(device = create_device())) + { + skip("Failed to create device, skipping tests.\n"); + return; + } + + hr = ID3D10Device_GetDeviceRemovedReason(device); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + hr = ID3D10Device_GetDeviceRemovedReason(device); + ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + START_TEST(device) { test_create_texture2d(); @@ -893,4 +914,5 @@ START_TEST(device) test_create_depthstencil_state(); test_create_rasterizer_state(); test_create_predicate(); + test_device_removed_reason(); }