d3d10core: Implement d3d10_device_GetDeviceRemovedReason().

This commit is contained in:
Henri Verbeet 2014-06-13 10:01:21 +02:00 committed by Alexandre Julliard
parent 90e662c4e7
commit 8d23f13b16
2 changed files with 27 additions and 2 deletions

View file

@ -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)

View file

@ -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();
}