[PATCH 3/3] wined3d: Do not emit an upload for NOOVERWRITE maps on deferred contexts.

Henri Verbeet hverbeet at gmail.com
Wed Sep 29 11:22:34 CDT 2021


On Wed, 29 Sept 2021 at 18:04, Zebediah Figura (she/her)
<zfigura at codeweavers.com> wrote:
>
> On 9/29/21 10:48, Henri Verbeet wrote:
> > On Tue, 28 Sept 2021 at 23:28, Zebediah Figura <zfigura at codeweavers.com> wrote:
> >> @@ -2749,6 +2751,7 @@ void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_conte
> >>       op->box = *box;
> >>       op->bo.addr.buffer_object = 0;
> >>       op->bo.addr.addr = data;
> >> +    op->bo.flags = UPLOAD_BO_UPLOAD_ON_UNMAP;
> >>       op->row_pitch = row_pitch;
> >>       op->slice_pitch = slice_pitch;
> >>
> > Do we need UPLOAD_BO_UPLOAD_ON_UNMAP here? It seems a little out of
> > place, and wined3d_cs_exec_update_sub_resource() doesn't appear to use
> > it.
>
> No, I suppose we don't. Thinking too far ahead...
>
> Although if we obsolesce UPLOAD_BO_UPLOAD_ON_UNMAP entirely, which is
> possible, that does mean we can't use it for deferred contexts as you
> suggest below. (And if we don't, it's mildly weird not to pass it here.)
>
Is it? My understanding was that UPLOAD_ON_UNMAP was primarily for
wined3d_device_context_emit_unmap(), to distinguish the case where we
got a reference to the original buffer object. (As is the case with
NOOVERWRITE maps on deferred contexts, but we could conceivably do
that on immediate contexts as well in some cases.)



More information about the wine-devel mailing list