From: Connor McAdams cmcadams@codeweavers.com
Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/d3d9/device.c | 7 +++++++ dlls/d3d9/tests/visual.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 408dace48ad..e5b5463dbba 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1800,6 +1800,13 @@ static HRESULT WINAPI d3d9_device_UpdateSurface(IDirect3DDevice9Ex *iface, return D3DERR_INVALIDCALL; }
+ if (src_desc.multisample_type != WINED3D_MULTISAMPLE_NONE || dst_desc.multisample_type != WINED3D_MULTISAMPLE_NONE) + { + wined3d_mutex_unlock(); + WARN("Cannot use UpdateSurface with multisampled surfaces.\n"); + return D3DERR_INVALIDCALL; + } + if (src_rect) wined3d_box_set(&src_box, src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, 0, 1); else diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 806ab8f2802..3f3de411143 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -4548,10 +4548,10 @@ static void test_multisample_stretch_rect(void)
/* UpdateSurface does not support multisampled surfaces. */ hr = IDirect3DDevice9_UpdateSurface(device, rt, NULL, ms_rt, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DDevice9_UpdateSurface(device, ms_rt, NULL, rt, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(filters); ++i) {