Commit 5c446e92 authored by Chip Davis's avatar Chip Davis Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_FinishCommandList().

This always returns DXGI_ERROR_INVALID_CALL. Signed-off-by: 's avatarChip Davis <cdavis@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent fff36427
......@@ -2416,9 +2416,9 @@ static UINT STDMETHODCALLTYPE d3d11_immediate_context_GetContextFlags(ID3D11Devi
static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_FinishCommandList(ID3D11DeviceContext1 *iface,
BOOL restore, ID3D11CommandList **command_list)
{
FIXME("iface %p, restore %#x, command_list %p stub!\n", iface, restore, command_list);
TRACE("iface %p, restore %#x, command_list %p.\n", iface, restore, command_list);
return E_NOTIMPL;
return DXGI_ERROR_INVALID_CALL;
}
static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion1(ID3D11DeviceContext1 *iface,
......
......@@ -2147,15 +2147,23 @@ static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
ok(!refcount, "Device has %u references left.\n", refcount);
}
static void test_get_immediate_context(void)
static void test_immediate_context(void)
{
ID3D11DeviceContext *immediate_context, *previous_immediate_context;
ULONG expected_refcount, refcount;
ID3D11CommandList *command_list;
ID3D11Multithread *multithread;
ID3D11Buffer *buffer[2];
ID3D11Device *device;
BOOL enabled;
HRESULT hr;
static const unsigned int buffer_contents[] =
{
0x11111111, 0x22222222, 0x33333333, 0x44444444,
0x55555555, 0x66666666, 0x77777777, 0x88888888,
};
if (!(device = create_device(NULL)))
{
skip("Failed to create device.\n");
......@@ -2205,6 +2213,23 @@ static void test_get_immediate_context(void)
ID3D11Multithread_Release(multithread);
ID3D11Device_GetImmediateContext(device, &immediate_context);
hr = ID3D11DeviceContext_FinishCommandList(immediate_context, FALSE, &command_list);
ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
buffer[0] = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, 16, &buffer_contents[0]);
buffer[1] = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, 16, &buffer_contents[4]);
ID3D11DeviceContext_CopyResource(immediate_context, (ID3D11Resource *)buffer[1], (ID3D11Resource *)buffer[0]);
hr = ID3D11DeviceContext_FinishCommandList(immediate_context, FALSE, &command_list);
ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
ID3D11Buffer_Release(buffer[1]);
ID3D11Buffer_Release(buffer[0]);
ID3D11DeviceContext_Release(immediate_context);
done:
refcount = ID3D11DeviceContext_Release(immediate_context);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
......@@ -30086,7 +30111,7 @@ START_TEST(d3d11)
queue_test(test_create_device);
queue_for_each_feature_level(test_device_interfaces);
queue_test(test_get_immediate_context);
queue_test(test_immediate_context);
queue_test(test_create_deferred_context);
queue_test(test_create_texture1d);
queue_test(test_texture1d_interfaces);
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