Commit f6d2737e authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Make the entire surface current after clearing a discarded depth buffer.

parent 50a91e11
......@@ -501,6 +501,14 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context
{
RECT current_rect, r;
if (ds->flags & SFLAG_DISCARDED)
{
/* Depth buffer was discarded, make it entirely current in its new location since
* there is no other place where we would get data anyway. */
SetRect(out_rect, 0, 0, ds->resource.width, ds->resource.height);
return;
}
if (ds->flags & location)
SetRect(&current_rect, 0, 0,
ds->ds_current_size.cx,
......
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