Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_device_copy_uav_counter().

Alexandre Julliard julliard at winehq.org
Tue Apr 6 15:50:13 CDT 2021


Module: wine
Branch: master
Commit: c541c1e9f903b2d4d7d26e61697bd9cf38ce7dbb
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c541c1e9f903b2d4d7d26e61697bd9cf38ce7dbb

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Apr  5 23:40:22 2021 -0500

wined3d: Pass a wined3d_device_context to wined3d_device_copy_uav_counter().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/device.c       | 4 ++--
 dlls/wined3d/device.c     | 8 ++++----
 dlls/wined3d/wined3d.spec | 2 +-
 include/wine/wined3d.h    | 4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 2738ff1a5bd..e84f88ff5f2 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1273,7 +1273,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
 static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
 {
-    struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+    struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
     struct d3d11_unordered_access_view *uav;
     struct d3d_buffer *buffer_impl;
 
@@ -1284,7 +1284,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D
     uav = unsafe_impl_from_ID3D11UnorderedAccessView(src_view);
 
     wined3d_mutex_lock();
-    wined3d_device_copy_uav_counter(device->wined3d_device,
+    wined3d_device_context_copy_uav_counter(context->wined3d_context,
             buffer_impl->wined3d_buffer, dst_offset, uav->wined3d_view);
     wined3d_mutex_unlock();
 }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 540dcfdcc9f..c03621c706a 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4812,13 +4812,13 @@ float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
     return 0.0f;
 }
 
-void CDECL wined3d_device_copy_uav_counter(struct wined3d_device *device,
+void CDECL wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context,
         struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
 {
-    TRACE("device %p, dst_buffer %p, offset %u, uav %p.\n",
-            device, dst_buffer, offset, uav);
+    TRACE("context %p, dst_buffer %p, offset %u, uav %p.\n",
+            context, dst_buffer, offset, uav);
 
-    wined3d_device_context_emit_copy_uav_counter(&device->cs->c, dst_buffer, offset, uav);
+    wined3d_device_context_emit_copy_uav_counter(context, dst_buffer, offset, uav);
 }
 
 static bool resources_format_compatible(const struct wined3d_resource *src_resource,
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 918e9e253cc..3ea90e0c925 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -46,7 +46,6 @@
 @ cdecl wined3d_device_clear_unordered_access_view_uint(ptr ptr ptr)
 @ cdecl wined3d_device_copy_resource(ptr ptr ptr)
 @ cdecl wined3d_device_copy_sub_resource_region(ptr ptr long long long long ptr long ptr long)
-@ cdecl wined3d_device_copy_uav_counter(ptr ptr long ptr)
 @ cdecl wined3d_device_create(ptr ptr long ptr long long ptr long ptr ptr)
 @ cdecl wined3d_device_decref(ptr)
 @ cdecl wined3d_device_dispatch_compute(ptr long long long)
@@ -166,6 +165,7 @@
 @ cdecl wined3d_device_update_texture(ptr ptr ptr)
 @ cdecl wined3d_device_validate_device(ptr ptr)
 
+@ cdecl wined3d_device_context_copy_uav_counter(ptr ptr long ptr)
 @ cdecl wined3d_device_context_draw(ptr long long long long)
 @ cdecl wined3d_device_context_draw_indexed(ptr long long long long long)
 @ cdecl wined3d_device_context_draw_indirect(ptr ptr long long)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 18dab157834..bff77b2b949 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2363,8 +2363,6 @@ HRESULT __cdecl wined3d_device_copy_sub_resource_region(struct wined3d_device *d
         struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x,
         unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource,
         unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags);
-void __cdecl wined3d_device_copy_uav_counter(struct wined3d_device *device,
-        struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav);
 HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, struct wined3d_adapter *adapter,
         enum wined3d_device_type device_type, HWND focus_window, DWORD behaviour_flags, BYTE surface_alignment,
         const enum wined3d_feature_level *feature_levels, unsigned int feature_level_count,
@@ -2557,6 +2555,8 @@ 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);
 
+void __cdecl wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context,
+        struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav);
 void __cdecl wined3d_device_context_dispatch(struct wined3d_device_context *context,
         unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z);
 void __cdecl wined3d_device_context_dispatch_indirect(struct wined3d_device_context *context,




More information about the wine-cvs mailing list