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

wined3d: Skip acquiring a context for an offscreen resource in texture2d_read_from_framebuffer().

parent 510e2626
......@@ -368,7 +368,7 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
restore_texture = context->current_rt.texture;
restore_idx = context->current_rt.sub_resource_idx;
if (restore_texture != texture || restore_idx != sub_resource_idx)
if (!wined3d_resource_is_offscreen(resource) && (restore_texture != texture || restore_idx != sub_resource_idx))
context = context_acquire(device, texture, sub_resource_idx);
else
restore_texture = NULL;
......
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