Henri Verbeet : wined3d: Pass non-NULL rectangles to wined3d_surface_blt() in resolve_depth_buffer().
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jan 27 11:27:20 CST 2016
Module: wine
Branch: master
Commit: 756b5e777a9ae5618dbf713b1c36ee39d85cdcc6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=756b5e777a9ae5618dbf713b1c36ee39d85cdcc6
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jan 27 00:06:26 2016 +0100
wined3d: Pass non-NULL rectangles to wined3d_surface_blt() in resolve_depth_buffer().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/device.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 581d119..05daafe 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2015,6 +2015,7 @@ static void resolve_depth_buffer(struct wined3d_state *state)
{
struct wined3d_texture *texture = state->textures[0];
struct wined3d_surface *depth_stencil, *surface;
+ RECT src_rect, dst_rect;
if (!texture || texture->resource.type != WINED3D_RTYPE_TEXTURE_2D
|| !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH))
@@ -2023,7 +2024,9 @@ static void resolve_depth_buffer(struct wined3d_state *state)
if (!(depth_stencil = wined3d_rendertarget_view_get_surface(state->fb->depth_stencil)))
return;
- wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT);
+ SetRect(&dst_rect, 0, 0, surface->resource.width, surface->resource.height);
+ SetRect(&src_rect, 0, 0, depth_stencil->resource.width, depth_stencil->resource.height);
+ wined3d_surface_blt(surface, &dst_rect, depth_stencil, &src_rect, 0, NULL, WINED3D_TEXF_POINT);
}
void CDECL wined3d_device_set_render_state(struct wined3d_device *device,
More information about the wine-cvs
mailing list