Henri Verbeet : ddraw: Use wined3d_texture_blt() in ddraw_surface7_BltFast ().
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jan 29 09:10:08 CST 2016
Module: wine
Branch: master
Commit: d6e7f18c84c0df934942e6570ab0818199c8c009
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6e7f18c84c0df934942e6570ab0818199c8c009
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Jan 28 18:40:25 2016 +0100
ddraw: Use wined3d_texture_blt() in ddraw_surface7_BltFast().
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ddraw/ddraw.c | 2 +-
dlls/ddraw/ddraw_private.h | 4 +++-
dlls/ddraw/surface.c | 8 +++++---
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index a3c9465..d7bf099 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -4765,7 +4765,7 @@ static HRESULT CDECL device_parent_surface_created(struct wined3d_device_parent
return DDERR_OUTOFVIDEOMEMORY;
}
- ddraw_surface_init(ddraw_surface, ddraw, wined3d_texture, surface, parent_ops);
+ ddraw_surface_init(ddraw_surface, ddraw, wined3d_texture, sub_resource_idx, surface, parent_ops);
*parent = ddraw_surface;
ddraw_update_lost_surfaces(ddraw);
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
index 1966a3e..4fb1820 100644
--- a/dlls/ddraw/ddraw_private.h
+++ b/dlls/ddraw/ddraw_private.h
@@ -163,6 +163,7 @@ struct ddraw_surface
struct ddraw *ddraw;
struct wined3d_surface *wined3d_surface;
struct wined3d_texture *wined3d_texture;
+ unsigned int sub_resource_idx;
struct wined3d_rendertarget_view *wined3d_rtv;
struct wined3d_private_store private_store;
struct d3d_device *device1;
@@ -209,7 +210,8 @@ struct ddraw_texture
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc,
struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) DECLSPEC_HIDDEN;
struct wined3d_rendertarget_view *ddraw_surface_get_rendertarget_view(struct ddraw_surface *surface) DECLSPEC_HIDDEN;
-void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, struct wined3d_texture *wined3d_texture,
+void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw,
+ struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
struct wined3d_surface *wined3d_surface, const struct wined3d_parent_ops **parent_ops) DECLSPEC_HIDDEN;
ULONG ddraw_surface_release_iface(struct ddraw_surface *This) DECLSPEC_HIDDEN;
HRESULT ddraw_surface_update_frontbuffer(struct ddraw_surface *surface,
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 4e8f547..1296e59 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -4132,8 +4132,8 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_BltFast(IDirectDrawSurfac
if (src_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
hr = ddraw_surface_update_frontbuffer(src_impl, src_rect, TRUE);
if (SUCCEEDED(hr))
- hr = wined3d_surface_blt(dst_impl->wined3d_surface, &dst_rect,
- src_impl->wined3d_surface, src_rect, flags, NULL, WINED3D_TEXF_POINT);
+ hr = wined3d_texture_blt(dst_impl->wined3d_texture, dst_impl->sub_resource_idx, &dst_rect,
+ src_impl->wined3d_texture, src_impl->sub_resource_idx, src_rect, flags, NULL, WINED3D_TEXF_POINT);
if (SUCCEEDED(hr) && (dst_impl->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))
hr = ddraw_surface_update_frontbuffer(dst_impl, &dst_rect, FALSE);
wined3d_mutex_unlock();
@@ -6215,7 +6215,8 @@ fail:
return hr;
}
-void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, struct wined3d_texture *wined3d_texture,
+void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw,
+ struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
struct wined3d_surface *wined3d_surface, const struct wined3d_parent_ops **parent_ops)
{
struct ddraw_texture *texture = wined3d_texture_get_parent(wined3d_texture);
@@ -6277,6 +6278,7 @@ void ddraw_surface_init(struct ddraw_surface *surface, struct ddraw *ddraw, stru
surface->wined3d_surface = wined3d_surface;
wined3d_texture_incref(surface->wined3d_texture = wined3d_texture);
+ surface->sub_resource_idx = sub_resource_idx;
*parent_ops = &ddraw_surface_wined3d_parent_ops;
wined3d_private_store_init(&surface->private_store);
More information about the wine-cvs
mailing list