Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/wined3d/cs.c | 3 +++ dlls/wined3d/wined3d_private.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3593e5bfb48..6e4517d6ec8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2403,6 +2403,9 @@ static void wined3d_cs_acquire_command_list(struct wined3d_device_context *conte
for (i = 0; i < list->resource_count; ++i) wined3d_resource_acquire(list->resources[i]); + + for (i = 0; i < list->command_list_count; ++i) + wined3d_cs_acquire_command_list(context, list->command_lists[i]); }
static void wined3d_cs_exec_preload_resource(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 36fdf56a73c..952c10d6a71 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4120,7 +4120,8 @@ static inline void wined3d_resource_acquire(struct wined3d_resource *resource)
static inline void wined3d_resource_release(struct wined3d_resource *resource) { - InterlockedDecrement(&resource->access_count); + LONG refcount = InterlockedDecrement(&resource->access_count); + assert(refcount >= 0); }
static inline HRESULT wined3d_resource_get_sub_resource_desc(struct wined3d_resource *resource,