[PATCH 1/3] wined3d: Use wined3d_buffer_load_location() in wined3d_buffer_get_memory().

Henri Verbeet hverbeet at gmail.com
Fri Jan 28 05:12:49 CST 2022


On Fri, 28 Jan 2022 at 12:08, Henri Verbeet <hverbeet at gmail.com> wrote:
> On Fri, 28 Jan 2022 at 03:23, Zebediah Figura <zfigura at codeweavers.com> wrote:
> > @@ -653,14 +653,12 @@ DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_co
> >      if (locations & WINED3D_LOCATION_DISCARDED)
> >      {
> >          locations = ((buffer->flags & WINED3D_BUFFER_USE_BO) ? WINED3D_LOCATION_BUFFER : WINED3D_LOCATION_SYSMEM);
> > -        if (!wined3d_buffer_prepare_location(buffer, context, locations))
> > +        if (!wined3d_buffer_load_location(buffer, context, locations))
> >          {
> >              data->buffer_object = 0;
> >              data->addr = NULL;
> >              return 0;
> >          }
> > -        wined3d_buffer_validate_location(buffer, locations);
> > -        wined3d_buffer_invalidate_location(buffer, WINED3D_LOCATION_DISCARDED);
> >      }
> Where would we load the contents from if the buffer has been discarded?

Or well, I suppose the point of the patch is that
wined3d_buffer_load_location() will essentially do the same thing as
the code it replaces in this case; I guess that makes sense.



More information about the wine-devel mailing list