Commit 462b6d1b authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Explicitly calculate the sub-resource level in surface_load_renderbuffer().

parent 7d4bcd5d
......@@ -2441,9 +2441,10 @@ static BOOL surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
DWORD dst_location)
{
struct wined3d_texture *texture = surface->container;
unsigned int level = surface_get_sub_resource_idx(surface) % texture->level_count;
const RECT rect = {0, 0,
wined3d_texture_get_level_width(texture, surface->texture_level),
wined3d_texture_get_level_height(texture, surface->texture_level)};
wined3d_texture_get_level_width(texture, level),
wined3d_texture_get_level_height(texture, level)};
DWORD locations = surface_get_sub_resource(surface)->locations;
DWORD src_location;
......
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