[PATCH 4/5] wined3d: Prepare destination location in texture2d_read_from_framebuffer().
Matteo Bruni
matteo.mystral at gmail.com
Sun Mar 21 16:05:30 CDT 2021
On Thu, Mar 18, 2021 at 2:33 PM Henri Verbeet <hverbeet at gmail.com> wrote:
>
> On Wed, 17 Mar 2021 at 13:35, Matteo Bruni <mbruni at codeweavers.com> wrote:
> > @@ -422,6 +422,10 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
> > unsigned int i;
> > BYTE *mem;
> >
> > + TRACE("texture %p, sub_resource_idx %u, context %p, src_location %#x, dst_location %#x.\n",
> > + texture, sub_resource_idx, context, src_location, dst_location);
> > +
> > + wined3d_texture_prepare_location(texture, sub_resource_idx, context, dst_location);
> > wined3d_texture_get_memory(texture, sub_resource_idx, &data, dst_location);
> >
> We shouldn't need this (texture2d_read_from_framebuffer() is
> ultimately a helper for wined3d_texture_gl_load_location(), which
> calls wined3d_texture_gl_prepare_location() before calling any of its
> helpers), and in principle we don't make prepare calls in equivalent
> functions.
I think this helped to some degree for backbuffer ORM, at some point
in the past. I need to recheck but I agree that it would be the
responsibility of the caller to prepare the destination anyway.
Actually, maybe this was "required" by patch 5/5.
More information about the wine-devel
mailing list