[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690

Alexandre Julliard julliard at winehq.org
Sun Jun 17 20:04:03 UTC 2012


The following commit has been merged in the wheezy branch:
commit 73c826936b96f86cd4a85211f0fc85d94cce150d
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon May 21 20:48:33 2012 +0200

    wined3d: Move the resource map count field up to wined3d_resource.
    (cherry picked from commit f2fb3f11f935e4feaf4d6109a56c82eda8b3ec60)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index e4f3668..94f365f 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1002,7 +1002,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
         if (!buffer_add_dirty_area(buffer, offset, size)) return E_OUTOFMEMORY;
     }
 
-    count = InterlockedIncrement(&buffer->lock_count);
+    count = ++buffer->resource.map_count;
 
     if (buffer->buffer_object)
     {
@@ -1115,13 +1115,13 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
      * number of Map calls, d3d returns always D3D_OK.
      * This is also needed to prevent Map from returning garbage on
      * the next call (this will happen if the lock_count is < 0). */
-    if (!buffer->lock_count)
+    if (!buffer->resource.map_count)
     {
         WARN("Unmap called without a previous map call.\n");
         return;
     }
 
-    if (InterlockedDecrement(&buffer->lock_count))
+    if (--buffer->resource.map_count)
     {
         /* Delay loading the buffer until everything is unlocked */
         TRACE("Ignoring unmap.\n");
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 899a0bec..ea66128 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1838,6 +1838,7 @@ struct wined3d_resource
 {
     LONG ref;
     LONG bind_count;
+    LONG map_count;
     struct wined3d_device *device;
     enum wined3d_resource_type type;
     const struct wined3d_format *format;
@@ -2410,7 +2411,6 @@ struct wined3d_buffer
     UINT buffer_object_size;
     DWORD flags;
 
-    LONG lock_count;
     struct wined3d_map_range *maps;
     ULONG maps_size, modified_areas;
     struct wined3d_event_query *query;

-- 
Debian Wine packaging



More information about the pkg-wine-party mailing list