Commit be3baca9 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_CopyStructureCount().

parent 24c39103
......@@ -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,
......
......@@ -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)
{
......
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