wined3d: Explicitly calculate the sub-resource level 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 2018-02-27 09:55:11 +03:30 committed by Alexandre Julliard
parent d46cbb832c
commit bca2fc4189
1 changed files with 4 additions and 4 deletions

View File

@ -281,11 +281,11 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
}
else
{
unsigned int ds_level = dsv->sub_resource_idx % depth_stencil->container->level_count;
render_offscreen = TRUE;
drawable_width = wined3d_texture_get_level_pow2_width(depth_stencil->container,
depth_stencil->texture_level);
drawable_height = wined3d_texture_get_level_pow2_height(depth_stencil->container,
depth_stencil->texture_level);
drawable_width = wined3d_texture_get_level_pow2_width(depth_stencil->container, ds_level);
drawable_height = wined3d_texture_get_level_pow2_height(depth_stencil->container, ds_level);
}
if (depth_stencil)