[PATCH v3 2/8] wined3d: Implement readback from 2D array textures using glGet[Compressed]TexImage().
hverbeet at gmail.com
Wed Apr 20 06:34:05 CDT 2016
On 20 April 2016 at 11:42, Józef Kucia <jkucia at codeweavers.com> wrote:
> @@ -874,7 +879,31 @@ static void surface_download_data(struct wined3d_surface *surface, const struct
> - wined3d_texture_get_memory(texture, surface_get_sub_resource_idx(surface), &data, dst_location);
> + sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx);
Actually, don't use wined3d_texture_get_sub_resource() if you know the
index is valid. It does extra validation that's only useful when the
index comes from outside of wined3d.
> + wined3d_texture_bind_and_dirtify(texture, context, !(sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB));
This is an unrelated change. In itself it's probably fine to make
surface_download_data() bind the texture, but if you do that it
becomes inconsistent with surface_upload_data(),
wined3d_volume_download_data() and wined3d_volume_upload_data().
More information about the wine-devel