Zebediah Figura : wined3d: Pass a wined3d_cs pointer to wined3d_not_from_cs().

Alexandre Julliard julliard at winehq.org
Tue Jul 6 18:09:35 CDT 2021


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon Jul  5 19:32:13 2021 -0500

wined3d: Pass a wined3d_cs pointer to wined3d_not_from_cs().

This partially reverts 6a9752bf5e3cff3ceb4249d5a5e59b4d548008d1.

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

---

 dlls/wined3d/cs.c              | 4 ++--
 dlls/wined3d/device.c          | 4 ++--
 dlls/wined3d/wined3d_private.h | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index d7e1d1383a8..b7c48d2d0a9 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -2457,7 +2457,7 @@ HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context,
 
     /* Mapping resources from the worker thread isn't an issue by itself, but
      * increasing the map count would be visible to applications. */
-    wined3d_not_from_cs(context->device);
+    wined3d_not_from_cs(context->device->cs);
 
     wined3d_resource_wait_idle(resource);
 
@@ -2502,7 +2502,7 @@ HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context
         return WINED3D_OK;
     }
 
-    wined3d_not_from_cs(context->device);
+    wined3d_not_from_cs(context->device->cs);
 
     op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_MAP);
     op->opcode = WINED3D_CS_OP_UNMAP;
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 6e600a59b72..b97d565c42d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5536,7 +5536,7 @@ void device_resource_add(struct wined3d_device *device, struct wined3d_resource
 {
     TRACE("device %p, resource %p.\n", device, resource);
 
-    wined3d_not_from_cs(device);
+    wined3d_not_from_cs(device->cs);
 
     list_add_head(&device->resources, &resource->resource_list_entry);
 }
@@ -5545,7 +5545,7 @@ static void device_resource_remove(struct wined3d_device *device, struct wined3d
 {
     TRACE("device %p, resource %p.\n", device, resource);
 
-    wined3d_not_from_cs(device);
+    wined3d_not_from_cs(device->cs);
 
     list_remove(&resource->resource_list_entry);
 }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 935fdb5cb4e..5f0c2bb6732 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -6041,9 +6041,9 @@ static inline void wined3d_from_cs(const struct wined3d_cs *cs)
         assert(cs->thread_id == GetCurrentThreadId());
 }
 
-static inline void wined3d_not_from_cs(const struct wined3d_device *device)
+static inline void wined3d_not_from_cs(const struct wined3d_cs *cs)
 {
-    assert(device->cs->thread_id != GetCurrentThreadId());
+    assert(cs->thread_id != GetCurrentThreadId());
 }
 
 static inline enum wined3d_material_color_source validate_material_colour_source(WORD use_map,




More information about the wine-cvs mailing list