Commit 18a6d9ab authored by Jan Sikorski's avatar Jan Sikorski Committed by Alexandre Julliard

wined3d: Acquire references to cleared render-target views for command lists by…

wined3d: Acquire references to cleared render-target views for command lists by inspecting CS packets. Signed-off-by: 's avatarJan Sikorski <jsikorski@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4f7837a5
......@@ -3616,6 +3616,20 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac
break;
}
case WINED3D_CS_OP_CLEAR:
{
struct wined3d_cs_clear *op = (struct wined3d_cs_clear *)packet->data;
for (i = 0; i < op->rt_count; ++i)
{
if (op->fb.render_targets[i])
wined3d_rendertarget_view_decref(op->fb.render_targets[i]);
}
if (op->fb.depth_stencil)
wined3d_rendertarget_view_decref(op->fb.depth_stencil);
break;
}
default:
break;
}
......@@ -3750,6 +3764,20 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet)
break;
}
case WINED3D_CS_OP_CLEAR:
{
struct wined3d_cs_clear *op = (struct wined3d_cs_clear *)packet->data;
for (i = 0; i < op->rt_count; ++i)
{
if (op->fb.render_targets[i])
wined3d_rendertarget_view_incref(op->fb.render_targets[i]);
}
if (op->fb.depth_stencil)
wined3d_rendertarget_view_incref(op->fb.depth_stencil);
break;
}
default:
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment