d3d11: Implement d3d11_immediate_context_CopyStructureCount().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-08-04 19:53:49 +02:00 committed by Alexandre Julliard
parent 24c39103be
commit be3baca9a6
2 changed files with 15 additions and 3 deletions

View File

@ -1025,8 +1025,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11DeviceContext *iface,
ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
{
FIXME("iface %p, dst_buffer %p, dst_offset %u, src_view %p stub!\n",
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
struct d3d11_unordered_access_view *uav;
struct d3d_buffer *buffer_impl;
TRACE("iface %p, dst_buffer %p, dst_offset %u, src_view %p.\n",
iface, dst_buffer, dst_offset, src_view);
buffer_impl = unsafe_impl_from_ID3D11Buffer(dst_buffer);
uav = unsafe_impl_from_ID3D11UnorderedAccessView(src_view);
wined3d_mutex_lock();
wined3d_device_copy_uav_counter(device->wined3d_device,
buffer_impl->wined3d_buffer, dst_offset, uav->wined3d_view);
wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D11DeviceContext *iface,

View File

@ -17983,7 +17983,7 @@ static void test_uav_counters(void)
/* produce */
ID3D11DeviceContext_Dispatch(context, 16, 1, 1);
data = read_uav_counter(context, staging_buffer, uav);
todo_wine ok(data == 64, "Got unexpected value %u.\n", data);
ok(data == 64, "Got unexpected value %u.\n", data);
get_buffer_readback(buffer, &rb);
memcpy(id, rb.map_desc.pData, 64 * sizeof(*id));
release_resource_readback(&rb);
@ -18027,7 +18027,7 @@ static void test_uav_counters(void)
todo_wine ok(data == 4, "Got unexpected value %u.\n", data);
ID3D11DeviceContext_Dispatch(context, 1, 1, 1);
data = read_uav_counter(context, staging_buffer, uav);
ok(!data, "Got unexpected value %u.\n", data);
todo_wine ok(!data, "Got unexpected value %u.\n", data);
get_buffer_readback(buffer2, &rb);
for (i = 0; i < 8; ++i)
{