From: Jan Sikorski jsikorski@codeweavers.com
Signed-off-by: Jan Sikorski jsikorski@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/cs.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ae120b1790d..9f7421e865f 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -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; }