[PATCH 2/5] wined3d: Move location management into the resource.

Stefan Dösinger stefan at codeweavers.com
Tue Oct 1 06:05:40 CDT 2013


The goal is to have a common map function for buffers, surfaces and
volumes. The common map function handles GL buffer mapping, offset
calculation and error checking. With the CS, the common function will
handle DISCARD maps for sysmem and GL BOs.

The generic load_location function will be able to transfer data between
sysmem, GL buffer, user-provided memory (surface_set_mem) and DIBs. The
resource-specific callback will be responsible for transfering data from
or to other resources.
---
 dlls/wined3d/buffer.c          |   8 +++
 dlls/wined3d/device.c          |   2 +-
 dlls/wined3d/resource.c        |  59 ++++++++++++++++++++
 dlls/wined3d/surface.c         |  12 +++-
 dlls/wined3d/texture.c         |  10 ++++
 dlls/wined3d/volume.c          | 122 ++++++++++++++---------------------------
 dlls/wined3d/wined3d_private.h |  16 +++++-
 7 files changed, 143 insertions(+), 86 deletions(-)

diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index de06ae8..280f9d1 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1128,9 +1128,17 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
     }
 }
 
+/* Context activation is done by the caller. */
+static void wined3d_buffer_load_location(struct wined3d_resource *resource,
+        struct wined3d_context *context, DWORD location)
+{
+    ERR("Not yet implemented.\n");
+}
+
 static const struct wined3d_resource_ops buffer_resource_ops =
 {
     buffer_unload,
+    wined3d_buffer_load_location,
 };
 
 static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device *device,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 5f4cafb..744b9cf 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3624,7 +3624,7 @@ static HRESULT device_update_volume(struct wined3d_device *device,
     data.buffer_object = 0;
     data.addr = src.data;
     wined3d_volume_upload_data(dst_volume, context, &data);
-    wined3d_volume_invalidate_location(dst_volume, ~WINED3D_LOCATION_TEXTURE_RGB);
+    wined3d_resource_invalidate_location(&dst_volume->resource, ~WINED3D_LOCATION_TEXTURE_RGB);
 
     context_release(context);
 
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 6a0a29b..3398ebc 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -428,3 +428,62 @@ GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags)
         return GL_WRITE_ONLY_ARB;
     return GL_READ_WRITE_ARB;
 }
+
+void wined3d_resource_validate_location(struct wined3d_resource *resource, DWORD location)
+{
+    TRACE("Resource %p, setting %s.\n", resource, wined3d_debug_location(location));
+    resource->locations |= location;
+    TRACE("new location flags are %s.\n", wined3d_debug_location(resource->locations));
+}
+
+void wined3d_resource_invalidate_location(struct wined3d_resource *resource, DWORD location)
+{
+    TRACE("Resource %p, setting %s.\n", resource, wined3d_debug_location(location));
+    resource->locations &= ~location;
+    TRACE("new location flags are %s.\n", wined3d_debug_location(resource->locations));
+}
+
+DWORD resource_access_from_location(DWORD location)
+{
+    switch (location)
+    {
+        case WINED3D_LOCATION_DISCARDED:
+            return 0;
+
+        case WINED3D_LOCATION_SYSMEM:
+            return WINED3D_RESOURCE_ACCESS_CPU;
+
+        case WINED3D_LOCATION_BUFFER:
+        case WINED3D_LOCATION_TEXTURE_RGB:
+        case WINED3D_LOCATION_TEXTURE_SRGB:
+            return WINED3D_RESOURCE_ACCESS_GPU;
+
+        default:
+            FIXME("Unhandled location %#x.\n", location);
+            return 0;
+    }
+}
+
+/* Context activation is optionally by the caller. Context may be NULL. */
+void wined3d_resource_load_location(struct wined3d_resource *resource,
+        struct wined3d_context *context, DWORD location)
+{
+    DWORD required_access = resource_access_from_location(location);
+
+    if ((resource->locations & location) == location)
+    {
+        TRACE("Location(s) already up to date.\n");
+        return;
+    }
+
+    /* Keep this a WARN for now until surfaces are cleaned up. */
+    if ((resource->access_flags & required_access) != required_access)
+        WARN("Operation requires %#x access, but resource only has %#x.\n",
+                required_access, resource->access_flags);
+
+    /* Context is NULL in ddraw-only operation without OpenGL. */
+    if (!context)
+        ERR("A context is required for non-sysmem operation.\n");
+
+    resource->resource_ops->resource_load_location(resource, context, location);
+}
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9d7accd..4f2470f 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1561,9 +1561,17 @@ static void surface_unload(struct wined3d_resource *resource)
     resource_unload(resource);
 }
 
+/* Context activation is done by the caller. */
+static void wined3d_surface_load_location(struct wined3d_resource *resource,
+        struct wined3d_context *context, DWORD location)
+{
+    ERR("Not yet implemented.\n");
+}
+
 static const struct wined3d_resource_ops surface_resource_ops =
 {
     surface_unload,
+    wined3d_surface_load_location,
 };
 
 static const struct wined3d_surface_ops surface_ops =
@@ -5324,7 +5332,7 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location
         ERR("Surface %p does not have any up to date location.\n", surface);
 }
 
-static DWORD resource_access_from_location(DWORD location)
+static DWORD surface_access_from_location(DWORD location)
 {
     switch (location)
     {
@@ -5624,7 +5632,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location, c
 
     if (WARN_ON(d3d_surface))
     {
-        DWORD required_access = resource_access_from_location(location);
+        DWORD required_access = surface_access_from_location(location);
         if ((surface->resource.access_flags & required_access) != required_access)
             WARN("Operation requires %#x access, but surface only has %#x.\n",
                     required_access, surface->resource.access_flags);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 56d13f6..db95794 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -751,9 +751,17 @@ static const struct wined3d_texture_ops texture2d_ops =
     texture2d_sub_resource_cleanup,
 };
 
+/* Context activation is done by the caller. */
+static void wined3d_texture_load_location(struct wined3d_resource *resource,
+        struct wined3d_context *context, DWORD location)
+{
+    ERR("Should not be called on textures.\n");
+}
+
 static const struct wined3d_resource_ops texture2d_resource_ops =
 {
     texture2d_unload,
+    wined3d_texture_load_location,
 };
 
 static HRESULT cubetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
@@ -1114,9 +1122,11 @@ static const struct wined3d_texture_ops texture3d_ops =
     texture3d_sub_resource_cleanup,
 };
 
+/* Context activation is done by the caller. */
 static const struct wined3d_resource_ops texture3d_resource_ops =
 {
     texture3d_unload,
+    wined3d_texture_load_location,
 };
 
 static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct wined3d_resource_desc *desc,
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index d61f32f..dd34290 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -184,20 +184,6 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
         HeapFree(GetProcessHeap(), 0, mem);
 }
 
-static void wined3d_volume_validate_location(struct wined3d_volume *volume, DWORD location)
-{
-    TRACE("Volume %p, setting %s.\n", volume, wined3d_debug_location(location));
-    volume->locations |= location;
-    TRACE("new location flags are %s.\n", wined3d_debug_location(volume->locations));
-}
-
-void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location)
-{
-    TRACE("Volume %p, clearing %s.\n", volume, wined3d_debug_location(location));
-    volume->locations &= ~location;
-    TRACE("new location flags are %s.\n", wined3d_debug_location(volume->locations));
-}
-
 /* Context activation is done by the caller. */
 static void wined3d_volume_download_data(struct wined3d_volume *volume,
         const struct wined3d_context *context, const struct wined3d_bo_address *data)
@@ -233,28 +219,7 @@ static void wined3d_volume_download_data(struct wined3d_volume *volume,
 static void wined3d_volume_evict_sysmem(struct wined3d_volume *volume)
 {
     wined3d_resource_free_sysmem(&volume->resource);
-    wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_SYSMEM);
-}
-
-static DWORD volume_access_from_location(DWORD location)
-{
-    switch (location)
-    {
-        case WINED3D_LOCATION_DISCARDED:
-            return 0;
-
-        case WINED3D_LOCATION_SYSMEM:
-            return WINED3D_RESOURCE_ACCESS_CPU;
-
-        case WINED3D_LOCATION_BUFFER:
-        case WINED3D_LOCATION_TEXTURE_RGB:
-        case WINED3D_LOCATION_TEXTURE_SRGB:
-            return WINED3D_RESOURCE_ACCESS_GPU;
-
-        default:
-            FIXME("Unhandled location %#x.\n", location);
-            return 0;
-    }
+    wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_SYSMEM);
 }
 
 /* Context activation is done by the caller. */
@@ -296,20 +261,16 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume)
 
     return TRUE;
 }
+
 /* Context activation is done by the caller. */
-static void wined3d_volume_load_location(struct wined3d_volume *volume,
+static void wined3d_volume_load_location(struct wined3d_resource *resource,
         struct wined3d_context *context, DWORD location)
 {
-    DWORD required_access = volume_access_from_location(location);
+    struct wined3d_volume *volume = volume_from_resource(resource);
+    DWORD required_access = resource_access_from_location(location);
 
     TRACE("Volume %p, loading %s, have %s.\n", volume, wined3d_debug_location(location),
-        wined3d_debug_location(volume->locations));
-
-    if ((volume->locations & location) == location)
-    {
-        TRACE("Location(s) already up to date.\n");
-        return;
-    }
+        wined3d_debug_location(volume->resource.locations));
 
     if ((volume->resource.access_flags & required_access) != required_access)
     {
@@ -328,35 +289,35 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
                     && !(volume->flags & WINED3D_VFLAG_SRGB_ALLOCATED)))
                 ERR("Trying to load (s)RGB texture without prior allocation.\n");
 
-            if (volume->locations & WINED3D_LOCATION_DISCARDED)
+            if (volume->resource.locations & WINED3D_LOCATION_DISCARDED)
             {
                 TRACE("Volume previously discarded, nothing to do.\n");
-                wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED);
+                wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_DISCARDED);
             }
-            else if (volume->locations & WINED3D_LOCATION_SYSMEM)
+            else if (volume->resource.locations & WINED3D_LOCATION_SYSMEM)
             {
                 struct wined3d_bo_address data = {0, volume->resource.heap_memory};
                 wined3d_volume_upload_data(volume, context, &data);
             }
-            else if (volume->locations & WINED3D_LOCATION_BUFFER)
+            else if (volume->resource.locations & WINED3D_LOCATION_BUFFER)
             {
                 struct wined3d_bo_address data = {volume->pbo, NULL};
                 wined3d_volume_upload_data(volume, context, &data);
             }
-            else if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
+            else if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
             {
                 wined3d_volume_srgb_transfer(volume, context, TRUE);
             }
-            else if (volume->locations & WINED3D_LOCATION_TEXTURE_SRGB)
+            else if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_SRGB)
             {
                 wined3d_volume_srgb_transfer(volume, context, FALSE);
             }
             else
             {
-                FIXME("Implement texture loading from %s.\n", wined3d_debug_location(volume->locations));
+                FIXME("Implement texture loading from %s.\n", wined3d_debug_location(volume->resource.locations));
                 return;
             }
-            wined3d_volume_validate_location(volume, location);
+            wined3d_resource_validate_location(&volume->resource, location);
 
             if (wined3d_volume_can_evict(volume))
                 wined3d_volume_evict_sysmem(volume);
@@ -367,16 +328,16 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
             if (!volume->resource.heap_memory)
                 ERR("Trying to load WINED3D_LOCATION_SYSMEM without setting it up first.\n");
 
-            if (volume->locations & WINED3D_LOCATION_DISCARDED)
+            if (volume->resource.locations & WINED3D_LOCATION_DISCARDED)
             {
                 TRACE("Volume previously discarded, nothing to do.\n");
-                wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED);
+                wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_DISCARDED);
             }
-            else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
+            else if (volume->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
             {
                 struct wined3d_bo_address data = {0, volume->resource.heap_memory};
 
-                if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
+                if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
                     volume_bind_and_dirtify(volume, context, FALSE);
                 else
                     volume_bind_and_dirtify(volume, context, TRUE);
@@ -387,26 +348,26 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
             else
             {
                 FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n",
-                        wined3d_debug_location(volume->locations));
+                        wined3d_debug_location(volume->resource.locations));
                 return;
             }
-            wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM);
+            wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_SYSMEM);
             break;
 
         case WINED3D_LOCATION_BUFFER:
             if (!volume->pbo || !(volume->flags & WINED3D_VFLAG_PBO))
                 ERR("Trying to load WINED3D_LOCATION_BUFFER without setting it up first.\n");
 
-            if (volume->locations & WINED3D_LOCATION_DISCARDED)
+            if (volume->resource.locations & WINED3D_LOCATION_DISCARDED)
             {
                 TRACE("Volume previously discarded, nothing to do.\n");
-                wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED);
+                wined3d_resource_invalidate_location(&volume->resource, WINED3D_LOCATION_DISCARDED);
             }
-            else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
+            else if (volume->resource.locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
             {
                 struct wined3d_bo_address data = {volume->pbo, NULL};
 
-                if (volume->locations & WINED3D_LOCATION_TEXTURE_RGB)
+                if (volume->resource.locations & WINED3D_LOCATION_TEXTURE_RGB)
                     volume_bind_and_dirtify(volume, context, FALSE);
                 else
                     volume_bind_and_dirtify(volume, context, TRUE);
@@ -416,15 +377,15 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume,
             else
             {
                 FIXME("Implement WINED3D_LOCATION_BUFFER loading from %s.\n",
-                        wined3d_debug_location(volume->locations));
+                        wined3d_debug_location(volume->resource.locations));
                 return;
             }
-            wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER);
+            wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_BUFFER);
             break;
 
         default:
             FIXME("Implement %s loading from %s.\n", wined3d_debug_location(location),
-                    wined3d_debug_location(volume->locations));
+                    wined3d_debug_location(volume->resource.locations));
     }
 }
 
@@ -441,7 +402,7 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
             volume->flags |= WINED3D_VFLAG_SRGB_ALLOCATED;
         }
 
-        wined3d_volume_load_location(volume, context, WINED3D_LOCATION_TEXTURE_SRGB);
+        wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_TEXTURE_SRGB);
     }
     else
     {
@@ -451,7 +412,7 @@ void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *
             volume->flags |= WINED3D_VFLAG_ALLOCATED;
         }
 
-        wined3d_volume_load_location(volume, context, WINED3D_LOCATION_TEXTURE_RGB);
+        wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_TEXTURE_RGB);
     }
 }
 
@@ -498,15 +459,15 @@ static void volume_unload(struct wined3d_resource *resource)
     if (volume_prepare_system_memory(volume))
     {
         context = context_acquire(device, NULL);
-        wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM);
+        wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_SYSMEM);
         context_release(context);
-        wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM);
+        wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_SYSMEM);
     }
     else
     {
         ERR("Out of memory when unloading volume %p.\n", volume);
-        wined3d_volume_validate_location(volume, WINED3D_LOCATION_DISCARDED);
-        wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED);
+        wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_DISCARDED);
+        wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_DISCARDED);
     }
 
     if (volume->pbo)
@@ -692,9 +653,9 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
 
         wined3d_volume_prepare_pbo(volume, context);
         if (flags & WINED3D_MAP_DISCARD)
-            wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER);
+            wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_BUFFER);
         else
-            wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER);
+            wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_BUFFER);
 
         GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, volume->pbo));
 
@@ -727,12 +688,12 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
 
         if (flags & WINED3D_MAP_DISCARD)
         {
-            wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM);
+            wined3d_resource_validate_location(&volume->resource, WINED3D_LOCATION_SYSMEM);
         }
-        else if (!(volume->locations & WINED3D_LOCATION_SYSMEM))
+        else if (!(volume->resource.locations & WINED3D_LOCATION_SYSMEM))
         {
             context = context_acquire(device, NULL);
-            wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM);
+            wined3d_resource_load_location(&volume->resource, context, WINED3D_LOCATION_SYSMEM);
             context_release(context);
         }
         base_memory = volume->resource.heap_memory;
@@ -783,9 +744,9 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
         wined3d_texture_set_dirty(volume->container);
 
         if (volume->flags & WINED3D_VFLAG_PBO)
-            wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER);
+            wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_BUFFER);
         else
-            wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM);
+            wined3d_resource_invalidate_location(&volume->resource, ~WINED3D_LOCATION_SYSMEM);
     }
 
     volume->resource.map_count++;
@@ -833,6 +794,7 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume)
 static const struct wined3d_resource_ops volume_resource_ops =
 {
     volume_unload,
+    wined3d_volume_load_location,
 };
 
 static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device *device, UINT width,
@@ -870,7 +832,7 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_device
     }
 
     volume->texture_level = level;
-    volume->locations = WINED3D_LOCATION_DISCARDED;
+    volume->resource.locations = WINED3D_LOCATION_DISCARDED;
 
     if (pool == WINED3D_POOL_DEFAULT && usage & WINED3DUSAGE_DYNAMIC
             && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f5665dd..ebfd668 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1987,6 +1987,8 @@ static inline void context_invalidate_active_texture(struct wined3d_context *con
 struct wined3d_resource_ops
 {
     void (*resource_unload)(struct wined3d_resource *resource);
+    void (*resource_load_location)(struct wined3d_resource *resource,
+            struct wined3d_context *context, DWORD location);
 };
 
 struct wined3d_resource
@@ -2008,10 +2010,12 @@ struct wined3d_resource
     UINT size;
     DWORD priority;
     BYTE *allocatedMemory; /* Pointer to the real data location */
-    void *heap_memory;
     struct list privateData;
     struct list resource_list_entry;
 
+    DWORD locations;
+    void *heap_memory;
+
     void *parent;
     const struct wined3d_parent_ops *parent_ops;
     const struct wined3d_resource_ops *resource_ops;
@@ -2033,6 +2037,13 @@ DWORD wined3d_resource_sanitize_map_flags(const struct wined3d_resource *resourc
         DWORD flags) DECLSPEC_HIDDEN;
 GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
 GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags) DECLSPEC_HIDDEN;
+void wined3d_resource_validate_location(struct wined3d_resource *resource,
+        DWORD location) DECLSPEC_HIDDEN;
+void wined3d_resource_invalidate_location(struct wined3d_resource *resource,
+        DWORD location) DECLSPEC_HIDDEN;
+void wined3d_resource_load_location(struct wined3d_resource *resource,
+        struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
+DWORD resource_access_from_location(DWORD location) DECLSPEC_HIDDEN;
 
 /* Tests show that the start address of resources is 32 byte aligned */
 #define RESOURCE_ALIGNMENT 16
@@ -2136,7 +2147,7 @@ struct wined3d_volume
     struct wined3d_resource resource;
     struct wined3d_texture *container;
 
-    DWORD flags, locations;
+    DWORD flags;
     GLint texture_level;
     DWORD download_count;
     GLuint pbo;
@@ -2149,7 +2160,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc
 
 void wined3d_volume_load(struct wined3d_volume *volume, struct wined3d_context *context, BOOL srgb_mode) DECLSPEC_HIDDEN;
 void volume_set_container(struct wined3d_volume *volume, struct wined3d_texture *container) DECLSPEC_HIDDEN;
-void wined3d_volume_invalidate_location(struct wined3d_volume *volume, DWORD location) DECLSPEC_HIDDEN;
 void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wined3d_context *context,
         const struct wined3d_bo_address *data) DECLSPEC_HIDDEN;
 
-- 
1.8.1.5




More information about the wine-patches mailing list