[PATCH 1/2] wined3d: Add unimplemented flags parameter to wined3d_device_update_sub_resource.

Pablo Martin pmart-wine at riseup.net
Tue May 22 07:37:49 CDT 2018


Signed-off-by: Pablo Martin <pmart-wine at riseup.net>
---
Prepares wined3d_update_sub_resource so the flags parameter can be sent from UpdateSubresource1 in the next patch.

Tested on Ubuntu 17.10.

 dlls/d3d11/device.c       |  2 +-
 dlls/wined3d/buffer.c     |  2 +-
 dlls/wined3d/device.c     | 10 +++++++---
 dlls/wined3d/texture.c    |  2 +-
 dlls/wined3d/wined3d.spec |  2 +-
 include/wine/wined3d.h    |  2 +-
 6 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 68d6cf0ae9..4ca4f46741 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1054,7 +1054,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
     wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
     wined3d_mutex_lock();
     wined3d_device_update_sub_resource(device->wined3d_device, wined3d_resource,
-            subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch);
+            subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch, 0);
     wined3d_mutex_unlock();
 }
 
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 3f4552f2bb..e06d156c0b 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -1407,7 +1407,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device
 
     if (data)
         wined3d_device_update_sub_resource(device, &buffer->resource,
-                0, NULL, data->data, data->row_pitch, data->slice_pitch);
+                0, NULL, data->data, data->row_pitch, data->slice_pitch, 0);
 
     return WINED3D_OK;
 }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 9906f74568..0f590c40fe 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4299,13 +4299,17 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
 
 void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
         unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
-        unsigned int depth_pitch)
+        unsigned int depth_pitch, unsigned int flags)
 {
     unsigned int width, height, depth;
     struct wined3d_box b;
 
-    TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
-            device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch);
+    TRACE("device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u, "
+            "flags %#x.\n",
+            device, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch, flags);
+
+    if (flags)
+        FIXME("Ignoring flags %#x.\n", flags);
 
     if (resource->type == WINED3D_RTYPE_BUFFER)
     {
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 0b0545394c..91c703c970 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -3392,7 +3392,7 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
         for (i = 0; i < sub_count; ++i)
         {
             wined3d_device_update_sub_resource(device, &object->resource,
-                    i, NULL, data[i].data, data[i].row_pitch, data[i].slice_pitch);
+                    i, NULL, data[i].data, data[i].row_pitch, data[i].slice_pitch, 0);
         }
     }
 
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 7a8cf20381..db50a44295 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -200,7 +200,7 @@
 @ cdecl wined3d_device_show_cursor(ptr long)
 @ cdecl wined3d_device_uninit_3d(ptr)
 @ cdecl wined3d_device_uninit_gdi(ptr)
-@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long)
+@ cdecl wined3d_device_update_sub_resource(ptr ptr long ptr ptr long long long)
 @ cdecl wined3d_device_update_texture(ptr ptr ptr)
 @ cdecl wined3d_device_validate_device(ptr ptr)
 
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index bb4ad4852a..e15269f3b2 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2466,7 +2466,7 @@ HRESULT __cdecl wined3d_device_uninit_3d(struct wined3d_device *device);
 HRESULT __cdecl wined3d_device_uninit_gdi(struct wined3d_device *device);
 void __cdecl wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource,
         unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch,
-        unsigned int depth_pitch);
+        unsigned int depth_pitch, unsigned int flags);
 HRESULT __cdecl wined3d_device_update_texture(struct wined3d_device *device,
         struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture);
 HRESULT __cdecl wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes);
-- 
2.14.1




More information about the wine-devel mailing list