wined3d: Acquire references to cleared render-target views 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:
parent
4f7837a584
commit
18a6d9ab0e
|
@ -3616,6 +3616,20 @@ static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *pac
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -3750,6 +3764,20 @@ static void wined3d_cs_packet_incref_objects(struct wined3d_cs_packet *packet)
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue