[PATCH 1/2] wined3d: Handle scale with multisampled destination in texture2d_blt_fbo().
Henri Verbeet
hverbeet at gmail.com
Mon Mar 9 09:19:26 CDT 2020
On Mon, 9 Mar 2020 at 14:08, Paul Gofman <gofmanp at gmail.com> wrote:
> @@ -188,9 +194,14 @@ void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_context *co
> * the purpose of loading the destination surface.) */
> wined3d_texture_load_location(src_texture, src_sub_resource_idx, context, src_location);
> if (!texture2d_is_full_rect(dst_texture, dst_sub_resource_idx % dst_texture->level_count, dst_rect))
> + {
> wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, context, dst_location);
> + }
> else
> + {
> wined3d_texture_prepare_location(dst_texture, dst_sub_resource_idx, context, dst_location);
> + wined3d_texture_validate_location(dst_texture, dst_sub_resource_idx, dst_location);
> + }
...
> - if (dst_location == WINED3D_LOCATION_DRAWABLE && dst_texture->swapchain->front_buffer == dst_texture)
> + if (dst_location != orig_dst_location)
> + {
> + wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx, ~dst_location);
> + wined3d_texture_load_location(dst_texture, dst_sub_resource_idx, context, orig_dst_location);
> + }
As a general rule, it's not ideal to manipulate the valid locations
here, for various reasons. It would probably be best to do any
resolving in fbo_blitter_blit() instead of texture2d_blt_fbo(), and
then return the valid locations to the caller. (Compare e.g.
cpu_blitter_blit().)
More information about the wine-devel
mailing list