wined3d: Use wined3d_texture_load_location() in device_clear_render_targets().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-08-02 12:26:30 +02:00 committed by Alexandre Julliard
parent 3160eabf24
commit 56f60eed90
1 changed files with 5 additions and 5 deletions

View File

@ -324,15 +324,15 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
for (i = 0; i < rt_count; ++i)
{
struct wined3d_rendertarget_view *rtv = fb->render_targets[i];
struct wined3d_surface *rt = wined3d_rendertarget_view_get_surface(rtv);
if (rt && rtv->format->id != WINED3DFMT_NULL)
if (rtv && rtv->format->id != WINED3DFMT_NULL)
{
struct wined3d_texture *rt = wined3d_texture_from_resource(rtv->resource);
if (flags & WINED3DCLEAR_TARGET && !is_full_clear(target, draw_rect, rect_count ? clear_rect : NULL))
surface_load_location(rt, context, rtv->resource->draw_binding);
wined3d_texture_load_location(rt, rtv->sub_resource_idx, context, rtv->resource->draw_binding);
else
wined3d_texture_prepare_location(rt->container, rtv->sub_resource_idx,
context, rtv->resource->draw_binding);
wined3d_texture_prepare_location(rt, rtv->sub_resource_idx, context, rtv->resource->draw_binding);
}
}