wined3d: Acquire references to blitted resources for command lists by inspecting CS packets.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jan Sikorski 2022-01-26 15:43:36 +01:00 committed by Alexandre Julliard
parent 06a5337f7b
commit 51c10cbc33
1 changed files with 22 additions and 0 deletions

View File

@ -3693,6 +3693,17 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac
break; break;
} }
case WINED3D_CS_OP_BLT_SUB_RESOURCE:
{
struct wined3d_cs_blt_sub_resource *op;
op = (struct wined3d_cs_blt_sub_resource *)packet->data;
if (op->src_resource)
wined3d_resource_decref(op->src_resource);
wined3d_resource_decref(op->dst_resource);
break;
}
default: default:
break; break;
} }
@ -3904,6 +3915,17 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet)
break; break;
} }
case WINED3D_CS_OP_BLT_SUB_RESOURCE:
{
struct wined3d_cs_blt_sub_resource *op;
op = (struct wined3d_cs_blt_sub_resource *)packet->data;
if (op->src_resource)
wined3d_resource_incref(op->src_resource);
wined3d_resource_incref(op->dst_resource);
break;
}
default: default:
break; break;
} }