Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d11/device.c | 21 +++++++++++++++++---- dlls/d3d11/tests/d3d11.c | 3 --- 2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index f9db15f12fdc..5873be680dc8 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1179,10 +1179,23 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D ID3D11Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format) { - FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, src_resource %p, src_subresource_idx %u, " - "format %s stub!\n", - iface, dst_resource, dst_subresource_idx, src_resource, src_subresource_idx, - debug_dxgi_format(format)); + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface); + struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource; + enum wined3d_format_id wined3d_format; + + TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, " + "src_resource %p, src_subresource_idx %u, format %s.\n", + iface, dst_resource, dst_subresource_idx, + src_resource, src_subresource_idx, debug_dxgi_format(format)); + + wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource); + wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource); + wined3d_format = wined3dformat_from_dxgi_format(format); + wined3d_mutex_lock(); + wined3d_device_resolve_sub_resource(device->wined3d_device, + wined3d_dst_resource, dst_subresource_idx, + wined3d_src_resource, src_subresource_idx, wined3d_format); + wined3d_mutex_unlock(); }
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext *iface, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 93184ada6015..e0769a75a11e 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -24999,13 +24999,10 @@ static void test_alpha_to_coverage(void)
get_texture_readback(readback_texture, 0, &rb); SetRect(&rect, 0, 0, 200, 200); - todo_wine check_readback_data_color(&rb, &rect, expected_color, 1); SetRect(&rect, 200, 0, 640, 200); - todo_wine check_readback_data_color(&rb, &rect, 0xffffffff, 1); SetRect(&rect, 0, 200, 640, 480); - todo_wine check_readback_data_color(&rb, &rect, 0xffffffff, 1); release_resource_readback(&rb); }