[PATCH 5/5] wined3d: Read back onscreen surfaces before downloading.
Henri Verbeet
hverbeet at gmail.com
Thu Mar 18 08:33:05 CDT 2021
On Wed, 17 Mar 2021 at 13:35, Matteo Bruni <mbruni at codeweavers.com> wrote:
> @@ -1666,6 +1666,16 @@ HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_
> TRACE("Not doing download because of partial download (src).\n");
> else if (!wined3d_texture_is_full_rect(dst_texture, dst_sub_resource_idx % dst_texture->level_count, &dst_rect))
> TRACE("Not doing download because of partial download (dst).\n");
> + else if (src_sub_resource->locations == WINED3D_LOCATION_DRAWABLE)
> + {
> + context = context_acquire(device, src_texture, src_sub_resource_idx);
> + texture2d_read_from_framebuffer(src_texture, src_sub_resource_idx, context,
> + WINED3D_LOCATION_DRAWABLE, dst_texture->resource.map_binding);
> + wined3d_texture_validate_location(src_texture, src_sub_resource_idx, dst_texture->resource.map_binding);
> + context_release(context);
> + return texture2d_blt(dst_texture, dst_sub_resource_idx, dst_box,
> + src_texture, src_sub_resource_idx, src_box, flags, fx, filter);
> + }
It's perhaps not immediately obvious from the function name, but
texture2d_read_from_framebuffer() is specific to the GL backend.
Calling it from common code like texture2d_blt() is problematic.
More information about the wine-devel
mailing list