Commit 8d23f13b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_GetDeviceRemovedReason().

parent 90e662c4
......@@ -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)
......
......@@ -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();
}
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