From 06a5337f7b94a964f59ab53c9a5297764e117649 Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Wed, 26 Jan 2022 15:43:35 +0100 Subject: [PATCH] wined3d: Acquire references to updated resources for command lists by inspecting CS packets. Signed-off-by: Jan Sikorski Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/cs.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index b268ce83ca0..42839e813c3 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -3684,6 +3684,15 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac break; } + case WINED3D_CS_OP_UPDATE_SUB_RESOURCE: + { + struct wined3d_cs_update_sub_resource *op; + + op = (struct wined3d_cs_update_sub_resource *)packet->data; + wined3d_resource_decref(op->resource); + break; + } + default: break; } @@ -3886,6 +3895,15 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet) break; } + case WINED3D_CS_OP_UPDATE_SUB_RESOURCE: + { + struct wined3d_cs_update_sub_resource *op; + + op = (struct wined3d_cs_update_sub_resource *)packet->data; + wined3d_resource_incref(op->resource); + break; + } + default: break; } -- 2.11.4.GIT