[v3 07/10] d3d9: make use of wined3d_texture_unmap in d3d9_volume_UnlockBox

Riccardo Bortolato rikyz619 at gmail.com
Tue Oct 6 03:36:53 CDT 2015


Also removed wined3d_volume_unmap from wined3d public api.
---
 dlls/d3d9/volume.c             | 2 +-
 dlls/wined3d/volume.c          | 2 +-
 dlls/wined3d/wined3d.spec      | 1 -
 dlls/wined3d/wined3d_private.h | 1 +
 include/wine/wined3d.h         | 1 -
 5 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/d3d9/volume.c b/dlls/d3d9/volume.c
index 25c2c2c..dde8980 100644
--- a/dlls/d3d9/volume.c
+++ b/dlls/d3d9/volume.c
@@ -167,7 +167,7 @@ static HRESULT WINAPI d3d9_volume_UnlockBox(IDirect3DVolume9 *iface)
     TRACE("iface %p.\n", iface);
 
     wined3d_mutex_lock();
-    hr = wined3d_volume_unmap(volume->wined3d_volume);
+    hr = wined3d_texture_unmap(volume->wined3d_texture, volume->sub_resource_idx);
     wined3d_mutex_unlock();
 
     return hr;
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 743f2dd..608f0c0 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -676,7 +676,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume,
     return WINED3D_OK;
 }
 
-HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
+HRESULT wined3d_volume_unmap(struct wined3d_volume *volume)
 {
     TRACE("volume %p.\n", volume);
 
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 5406ce0..0efa91c 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -284,4 +284,3 @@
 @ cdecl wined3d_vertex_declaration_incref(ptr)
 
 @ cdecl wined3d_volume_get_resource(ptr)
-@ cdecl wined3d_volume_unmap(ptr)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index e5111ab..ff197c2 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2338,6 +2338,7 @@ void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD loc
 HRESULT wined3d_volume_map(struct wined3d_volume *volume,
         struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
 void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
+HRESULT wined3d_volume_unmap(struct wined3d_volume *volume);
 void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
         const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN;
 
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index b8f6001..7422545 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2569,7 +2569,6 @@ void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex
 ULONG __cdecl wined3d_vertex_declaration_incref(struct wined3d_vertex_declaration *declaration);
 
 struct wined3d_resource * __cdecl wined3d_volume_get_resource(struct wined3d_volume *volume);
-HRESULT __cdecl wined3d_volume_unmap(struct wined3d_volume *volume);
 
 /* Return the integer base-2 logarithm of x. Undefined for x == 0. */
 static inline unsigned int wined3d_log2i(unsigned int x)
-- 
1.9.1




More information about the wine-patches mailing list