From 8eaad5ab61fe01c56e9d2622b11fd9f1e058273e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 4 Nov 2015 19:31:30 +0100
Subject: wined3d: Rename wined3d_resource_(un)map to
 wined3d_resource_sub_resource_(un)map.

To avoid name conflicts in the CSMT patchset.
---
 dlls/d3d11/device.c       | 4 ++--
 dlls/d3d11/texture.c      | 8 ++++----
 dlls/d3d8/surface.c       | 4 ++--
 dlls/d3d8/volume.c        | 4 ++--
 dlls/d3d9/surface.c       | 4 ++--
 dlls/d3d9/volume.c        | 4 ++--
 dlls/wined3d/resource.c   | 4 ++--
 dlls/wined3d/wined3d.spec | 4 ++--
 include/wine/wined3d.h    | 6 +++---
 9 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 4560f52..b5cb5ed 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -215,7 +215,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext
     wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_map(wined3d_resource, subresource_idx,
+    hr = wined3d_resource_sub_resource_map(wined3d_resource, subresource_idx,
             &map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type));
     wined3d_mutex_unlock();
 
@@ -236,7 +236,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext
     wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
 
     wined3d_mutex_lock();
-    wined3d_resource_unmap(wined3d_resource, subresource_idx);
+    wined3d_resource_sub_resource_unmap(wined3d_resource, subresource_idx);
     wined3d_mutex_unlock();
 }
 
diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c
index 011a5f7..99e531a 100644
--- a/dlls/d3d11/texture.c
+++ b/dlls/d3d11/texture.c
@@ -366,7 +366,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture2d_Map(ID3D10Texture2D *iface, UIN
         FIXME("Ignoring map_flags %#x.\n", map_flags);
 
     wined3d_mutex_lock();
-    if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
+    if (SUCCEEDED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
             &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type))))
     {
         mapped_texture->pData = wined3d_map_desc.data;
@@ -384,7 +384,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_Unmap(ID3D10Texture2D *iface, UINT
     TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
 
     wined3d_mutex_lock();
-    wined3d_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
+    wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
     wined3d_mutex_unlock();
 }
 
@@ -823,7 +823,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN
         FIXME("Ignoring map_flags %#x.\n", map_flags);
 
     wined3d_mutex_lock();
-    if (SUCCEEDED(hr = wined3d_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
+    if (SUCCEEDED(hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx,
             &wined3d_map_desc, NULL, wined3d_map_flags_from_d3d11_map_type(map_type))))
     {
         mapped_texture->pData = wined3d_map_desc.data;
@@ -842,7 +842,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT
     TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx);
 
     wined3d_mutex_lock();
-    wined3d_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
+    wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(texture->wined3d_texture), sub_resource_idx);
     wined3d_mutex_unlock();
 }
 
diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c
index 679f094..21f1438 100644
--- a/dlls/d3d8/surface.c
+++ b/dlls/d3d8/surface.c
@@ -234,7 +234,7 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface,
         box.back = 1;
     }
 
-    hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
+    hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
             &map_desc, rect ? &box : NULL, flags);
     wined3d_mutex_unlock();
 
@@ -260,7 +260,7 @@ static HRESULT WINAPI d3d8_surface_UnlockRect(IDirect3DSurface8 *iface)
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
+    hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
     wined3d_mutex_unlock();
 
     switch(hr)
diff --git a/dlls/d3d8/volume.c b/dlls/d3d8/volume.c
index f26e424..d1ee0b5 100644
--- a/dlls/d3d8/volume.c
+++ b/dlls/d3d8/volume.c
@@ -148,7 +148,7 @@ static HRESULT WINAPI d3d8_volume_LockBox(IDirect3DVolume8 *iface,
             iface, locked_box, box, flags);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,
+    hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,
             &map_desc, (const struct wined3d_box *)box, flags);
     wined3d_mutex_unlock();
 
@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d8_volume_UnlockBox(IDirect3DVolume8 *iface)
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
+    hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
     wined3d_mutex_unlock();
 
     return hr;
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c
index 833c1f4..54baf83 100644
--- a/dlls/d3d9/surface.c
+++ b/dlls/d3d9/surface.c
@@ -251,7 +251,7 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
     }
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
+    hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx,
             &map_desc, rect ? &box : NULL, flags);
     wined3d_mutex_unlock();
 
@@ -272,7 +272,7 @@ static HRESULT WINAPI d3d9_surface_UnlockRect(IDirect3DSurface9 *iface)
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
+    hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(surface->wined3d_texture), surface->sub_resource_idx);
     wined3d_mutex_unlock();
 
     switch(hr)
diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
index 52502bf..a81b6c7 100644
--- a/dlls/d3d9/volume.c
+++ b/dlls/d3d9/volume.c
@@ -148,7 +148,7 @@ static HRESULT WINAPI d3d9_volume_LockBox(IDirect3DVolume9 *iface,
             iface, locked_box, box, flags);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,
+    hr = wined3d_resource_sub_resource_map(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx,
             &map_desc, (const struct wined3d_box *)box, flags);
     wined3d_mutex_unlock();
 
@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    hr = wined3d_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
+    hr = wined3d_resource_sub_resource_unmap(wined3d_texture_get_resource(volume->wined3d_texture), volume->sub_resource_idx);
     wined3d_mutex_unlock();
 
     return hr;
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index d466764..74be48d 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -295,7 +295,7 @@ void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, st
     desc->size = resource->size;
 }
 
-HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
+HRESULT CDECL wined3d_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
         struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
 {
     TRACE("resource %p, sub_resource_idx %u, map_desc %p, box %p, flags %#x.\n",
@@ -304,7 +304,7 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
     return resource->resource_ops->resource_sub_resource_map(resource, sub_resource_idx, map_desc, box, flags);
 }
 
-HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
+HRESULT CDECL wined3d_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
 {
     TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
 
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index a7e625d..b6be230 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -182,10 +182,10 @@
 @ cdecl wined3d_resource_get_desc(ptr ptr)
 @ cdecl wined3d_resource_get_parent(ptr)
 @ cdecl wined3d_resource_get_priority(ptr)
-@ cdecl wined3d_resource_map(ptr long ptr ptr long)
 @ cdecl wined3d_resource_set_parent(ptr ptr)
 @ cdecl wined3d_resource_set_priority(ptr long)
-@ cdecl wined3d_resource_unmap(ptr long)
+@ cdecl wined3d_resource_sub_resource_map(ptr long ptr ptr long)
+@ cdecl wined3d_resource_sub_resource_unmap(ptr long)
 
 @ cdecl wined3d_rendertarget_view_create(ptr ptr ptr ptr ptr)
 @ cdecl wined3d_rendertarget_view_create_from_surface(ptr ptr ptr ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 2deb450..e25aa69 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2422,11 +2422,11 @@ void __cdecl wined3d_resource_get_desc(const struct wined3d_resource *resource,
         struct wined3d_resource_desc *desc);
 void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resource);
 DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
-HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
-        struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
 void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
 DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
-HRESULT __cdecl wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx);
+HRESULT __cdecl wined3d_resource_sub_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
+        struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
+HRESULT __cdecl wined3d_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx);
 
 HRESULT __cdecl wined3d_rendertarget_view_create(const struct wined3d_rendertarget_view_desc *desc,
         struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
-- 
2.6.2

