diff --git a/dlls/d3d8/swapchain.c b/dlls/d3d8/swapchain.c index 70abae9053e..6fd30e5ba47 100644 --- a/dlls/d3d8/swapchain.c +++ b/dlls/d3d8/swapchain.c @@ -100,9 +100,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d8_swapchain_Present(IDirect3DSwapChai if (device->device_state != D3D8_DEVICE_STATE_OK) return D3DERR_DEVICELOST; + if (dirty_region) + FIXME("Ignoring dirty_region %p.\n", dirty_region); + wined3d_mutex_lock(); - hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, src_rect, - dst_rect, dst_window_override, dirty_region, 0); + hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, + src_rect, dst_rect, dst_window_override, 0); wined3d_mutex_unlock(); return hr; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 09c56db253c..47f4f7b2792 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -759,12 +759,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex * if (device->device_state != D3D9_DEVICE_STATE_OK) return device->d3d_parent->extended ? S_PRESENT_OCCLUDED : D3DERR_DEVICELOST; + if (dirty_region) + FIXME("Ignoring dirty_region %p.\n", dirty_region); + wined3d_mutex_lock(); for (i = 0; i < device->implicit_swapchain_count; ++i) { - hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain, src_rect, - dst_rect, dst_window_override, dirty_region, 0); - if (FAILED(hr)) + if (FAILED(hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain, + src_rect, dst_rect, dst_window_override, 0))) { wined3d_mutex_unlock(); return hr; @@ -3280,11 +3282,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex if (device->device_state != D3D9_DEVICE_STATE_OK) return S_PRESENT_OCCLUDED; + if (dirty_region) + FIXME("Ignoring dirty_region %p.\n", dirty_region); + wined3d_mutex_lock(); for (i = 0; i < device->implicit_swapchain_count; ++i) { - if (FAILED(hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain, src_rect, - dst_rect, dst_window_override, dirty_region, flags))) + if (FAILED(hr = wined3d_swapchain_present(device->implicit_swapchains[i]->wined3d_swapchain, + src_rect, dst_rect, dst_window_override, flags))) { wined3d_mutex_unlock(); return hr; diff --git a/dlls/d3d9/swapchain.c b/dlls/d3d9/swapchain.c index b9343aa92da..91ceaf03f4d 100644 --- a/dlls/d3d9/swapchain.c +++ b/dlls/d3d9/swapchain.c @@ -125,9 +125,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai if (device->device_state != D3D9_DEVICE_STATE_OK) return device->d3d_parent->extended ? S_PRESENT_OCCLUDED : D3DERR_DEVICELOST; + if (dirty_region) + FIXME("Ignoring dirty_region %p.\n", dirty_region); + wined3d_mutex_lock(); - hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, src_rect, - dst_rect, dst_window_override, dirty_region, flags); + hr = wined3d_swapchain_present(swapchain->wined3d_swapchain, + src_rect, dst_rect, dst_window_override, flags); wined3d_mutex_unlock(); return hr; diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index a12e1e5dc39..10a57864be9 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -146,7 +146,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_Present(IDXGISwapChain *iface, U if (flags) FIXME("Unimplemented flags %#x\n", flags); wined3d_mutex_lock(); - hr = wined3d_swapchain_present(This->wined3d_swapchain, NULL, NULL, NULL, NULL, 0); + hr = wined3d_swapchain_present(This->wined3d_swapchain, NULL, NULL, NULL, 0); wined3d_mutex_unlock(); return hr; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 316ccb85c74..21310e46e67 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -61,7 +61,6 @@ struct wined3d_cs_present struct wined3d_swapchain *swapchain; const RECT *src_rect; const RECT *dst_rect; - const RGNDATA *dirty_region; DWORD flags; }; @@ -259,13 +258,11 @@ static void wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data) swapchain = op->swapchain; wined3d_swapchain_set_window(swapchain, op->dst_window_override); - swapchain->swapchain_ops->swapchain_present(swapchain, - op->src_rect, op->dst_rect, op->dirty_region, op->flags); + swapchain->swapchain_ops->swapchain_present(swapchain, op->src_rect, op->dst_rect, op->flags); } void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, - const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, - const RGNDATA *dirty_region, DWORD flags) + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) { struct wined3d_cs_present *op; @@ -275,7 +272,6 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw op->swapchain = swapchain; op->src_rect = src_rect; op->dst_rect = dst_rect; - op->dirty_region = dirty_region; op->flags = flags; cs->ops->submit(cs); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 3aeabed62b9..d61034a702d 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4579,7 +4579,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst /* Set the swap effect to COPY, we don't want the backbuffer * to become undefined. */ dst_swapchain->desc.swap_effect = WINED3D_SWAP_EFFECT_COPY; - wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0); + wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0); dst_swapchain->desc.swap_effect = swap_effect; return WINED3D_OK; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 3033773c87e..9f394554e0d 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -133,12 +133,11 @@ void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWN } HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, - const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, - const RGNDATA *dirty_region, DWORD flags) + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) { - TRACE("swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.\n", + TRACE("swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p, flags %#x.\n", swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect), - dst_window_override, dirty_region, flags); + dst_window_override, flags); if (flags) FIXME("Ignoring flags %#x.\n", flags); @@ -150,7 +149,7 @@ HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, } wined3d_cs_emit_present(swapchain->device->cs, swapchain, src_rect, - dst_rect, dst_window_override, dirty_region, flags); + dst_rect, dst_window_override, flags); return WINED3D_OK; } @@ -467,8 +466,8 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct device_invalidate_state(swapchain->device, STATE_FRAMEBUFFER); } -static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, - const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags) +static void swapchain_gl_present(struct wined3d_swapchain *swapchain, + const RECT *src_rect_in, const RECT *dst_rect_in, DWORD flags) { struct wined3d_surface *back_buffer = surface_from_resource( wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)); @@ -709,8 +708,8 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai SetRectEmpty(&swapchain->front_buffer_update); } -static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, const RECT *src_rect_in, - const RECT *dst_rect_in, const RGNDATA *dirty_region, DWORD flags) +static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, + const RECT *src_rect_in, const RECT *dst_rect_in, DWORD flags) { struct wined3d_surface *front, *back; diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 82e0d4ffff2..7c90d601db2 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -231,7 +231,7 @@ @ cdecl wined3d_swapchain_get_desc(ptr ptr) @ cdecl wined3d_swapchain_get_raster_status(ptr ptr) @ cdecl wined3d_swapchain_incref(ptr) -@ cdecl wined3d_swapchain_present(ptr ptr ptr ptr ptr long) +@ cdecl wined3d_swapchain_present(ptr ptr ptr ptr long) @ cdecl wined3d_swapchain_resize_buffers(ptr long long long long long long) @ cdecl wined3d_swapchain_set_gamma_ramp(ptr long ptr) @ cdecl wined3d_swapchain_set_palette(ptr ptr) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 34ea6cd3f34..1a5feeb580f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2777,8 +2777,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_count, UINT start_instance, UINT instance_count, BOOL indexed) DECLSPEC_HIDDEN; void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, - const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, - const RGNDATA *dirty_region, DWORD flags) DECLSPEC_HIDDEN; + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags) DECLSPEC_HIDDEN; void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN; @@ -2948,8 +2947,8 @@ struct wined3d_shader_resource_view struct wined3d_swapchain_ops { - void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, - const RECT *dst_rect, const RGNDATA *dirty_region, DWORD flags); + void (*swapchain_present)(struct wined3d_swapchain *swapchain, + const RECT *src_rect, const RECT *dst_rect, DWORD flags); void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swaphchain); }; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d69d11efc01..c681c78ffc9 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2419,8 +2419,7 @@ HRESULT __cdecl wined3d_swapchain_get_raster_status(const struct wined3d_swapcha struct wined3d_raster_status *raster_status); ULONG __cdecl wined3d_swapchain_incref(struct wined3d_swapchain *swapchain); HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain, - const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, - const RGNDATA *dirty_region, DWORD flags); + const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, DWORD flags); HRESULT __cdecl wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count, unsigned int width, unsigned int height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality);