[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH v2 4/5] wined3d: Use context->ops->prepare_upload_bo() in wined3d_device_context_map() if
From:       Henri Verbeet <hverbeet () gmail ! com>
Date:       2021-06-30 21:02:13
Message-ID: CAOsNvwyY_OfdBB0pv7r+ocm_PsYz5ogh1sahm1B8OjKgb+mKZw () mail ! gmail ! com
[Download RAW message or body]

On Wed, 30 Jun 2021 at 22:07, Zebediah Figura (she/her)
<zfigura@codeweavers.com> wrote:
> On 6/30/21 2:46 PM, Henri Verbeet wrote:
> > Alternatively, we could do something like this in
> > wined3d_device_context_unmap():
> >
> >      ...
> >      if (context->ops->get_upload_bo(...))
> >      {
> >          ...
> >          wined3d_device_context_upload_bo(...);
> >          return WINED3D_OK;
> >      }
> >      ...
> >      return wined3d_device_context_emit_unmap(...);
>
> Where I'm guessing wined3d_device_context_emit_unmap() contains pretty
> much the entirety of wined3d_cs_unmap()?
>
Right.

> That had occurred to me as well, although I didn't implement it. I
> probably would leave it for a separate patch, though I'm not opposed to
> rolling it into this one.
>
Sure, we could do that in a subsequent patch.

> > which should also work, and may be preferable, because we could
> > implement wined3d_device_context_map() and
> > wined3d_device_context_update_sub_resource() in a similar way. I.e., I
> > think we can make this work with either
> > prepare_upload_bo()/get_upload_bo() or
> > update_sub_resource()/map()/unmap() in the device context ops, but we
> > probably don't need both sets of ops.
>
> I'd agree the second approach outlined in this email looks clearer.
> That, or to just use update_sub_resource/map/unmap. I don't have a
> preference between those two, so I'll leave that decision to the
> maintainer ;-)

I'm leaning towards prepare_upload_bo()/get_upload_bo() because it's
the smaller device context ops interface, and results in fewer levels
of map/unmap API, but it's not a strong preference.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic