[v9 09/11] ddraw: Replace wined3d_surface_map() with wined3d_resource_map() in d3d_texture2_Load().
Riccardo Bortolato
rikyz619 at gmail.com
Thu Nov 19 13:34:45 CST 2015
Also removed wined3d_surface_map() from the public wined3d api.
Signed-off-by: Riccardo Bortolato <rikyz619 at gmail.com>
---
dlls/ddraw/surface.c | 6 ++++--
dlls/wined3d/surface.c | 2 +-
dlls/wined3d/wined3d.spec | 1 -
dlls/wined3d/wined3d_private.h | 2 ++
include/wine/wined3d.h | 2 --
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index a983a0c..192ec43 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -5155,7 +5155,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
/* Copy the main memory texture into the surface that corresponds
* to the OpenGL texture object. */
- hr = wined3d_surface_map(src_surface->wined3d_surface, &src_map_desc, NULL, 0);
+ hr = wined3d_resource_map(wined3d_texture_get_resource(src_surface->wined3d_texture),
+ src_surface->sub_resource_idx, &src_map_desc, NULL, 0);
if (FAILED(hr))
{
ERR("Failed to lock source surface, hr %#x.\n", hr);
@@ -5163,7 +5164,8 @@ static HRESULT WINAPI d3d_texture2_Load(IDirect3DTexture2 *iface, IDirect3DTextu
return D3DERR_TEXTURE_LOAD_FAILED;
}
- hr = wined3d_surface_map(dst_surface->wined3d_surface, &dst_map_desc, NULL, 0);
+ hr = wined3d_resource_map(wined3d_texture_get_resource(dst_surface->wined3d_texture),
+ dst_surface->sub_resource_idx, &dst_map_desc, NULL, 0);
if (FAILED(hr))
{
ERR("Failed to lock destination surface, hr %#x.\n", hr);
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 64e4000..5d36451 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2483,7 +2483,7 @@ HRESULT CDECL wined3d_surface_unmap(struct wined3d_surface *surface)
return WINED3D_OK;
}
-HRESULT CDECL wined3d_surface_map(struct wined3d_surface *surface,
+HRESULT wined3d_surface_map(struct wined3d_surface *surface,
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
{
const struct wined3d_format *format = surface->resource.format;
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index c739588..856edbb 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -230,7 +230,6 @@
@ cdecl wined3d_surface_get_resource(ptr)
@ cdecl wined3d_surface_getdc(ptr ptr)
@ cdecl wined3d_surface_is_lost(ptr)
-@ cdecl wined3d_surface_map(ptr ptr ptr long)
@ cdecl wined3d_surface_preload(ptr)
@ cdecl wined3d_surface_releasedc(ptr ptr)
@ cdecl wined3d_surface_restore(ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b6e6635..8752e64 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2482,6 +2482,8 @@ HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct w
GLenum target, unsigned int level, unsigned int layer, DWORD flags,
struct wined3d_surface **surface) DECLSPEC_HIDDEN;
void wined3d_surface_destroy(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
+HRESULT wined3d_surface_map(struct wined3d_surface *surface,
+ struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN;
void surface_prepare_map_memory(struct wined3d_surface *surface) DECLSPEC_HIDDEN;
void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info,
const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point,
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 7b51534..5b44e13 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2486,8 +2486,6 @@ DWORD __cdecl wined3d_surface_get_pitch(const struct wined3d_surface *surface);
struct wined3d_resource * __cdecl wined3d_surface_get_resource(struct wined3d_surface *surface);
HRESULT __cdecl wined3d_surface_getdc(struct wined3d_surface *surface, HDC *dc);
HRESULT __cdecl wined3d_surface_is_lost(const struct wined3d_surface *surface);
-HRESULT __cdecl wined3d_surface_map(struct wined3d_surface *surface,
- struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
void __cdecl wined3d_surface_preload(struct wined3d_surface *surface);
HRESULT __cdecl wined3d_surface_releasedc(struct wined3d_surface *surface, HDC dc);
HRESULT __cdecl wined3d_surface_restore(struct wined3d_surface *surface);
--
1.9.1
More information about the wine-patches
mailing list