[PATCH v3 5/6] d3d9: Don't upload unused system memory vertex buffers.

Matteo Bruni matteo.mystral at gmail.com
Fri Mar 1 14:31:29 CST 2019


On Thu, Feb 28, 2019 at 1:22 PM Henri Verbeet <hverbeet at gmail.com> wrote:
>
> On Wed, 27 Feb 2019 at 21:01, Matteo Bruni <mbruni at codeweavers.com> wrote:
> > +    decl = wined3d_vertex_declaration_get_parent(wined3d_decl);
> > +    if (!decl->elements)
> > +    {
> > +        map = 1;
> > +    }
> Can that happen in d3d9?

No, that's an effect of writing the d3d8 patch first and then copying
it to d3d9 :/

> > +    else
> > +    {
> > +        map = 0;
> > +        if (FAILED(convert_to_wined3d_declaration(decl->elements, &elements, &count)))
> > +            return;
> > +        for (i = 0; i < count; ++i)
> > +            map |= 1u << elements[i].input_slot;
> > +        heap_free(elements);
> > +    }
> You don't need to convert the elements for that, the d3d9 elements
> have a "Stream" field too. If you wanted to be efficient about it, you
> could create the declaration's stream map on declaration creation.

Same here. Actually, creating the stream map at declaration creation
time makes things much simpler on d3d8.
Thanks!



More information about the wine-devel mailing list