[PATCH v3 5/6] d3d9: Don't upload unused system memory vertex buffers.
Henri Verbeet
hverbeet at gmail.com
Thu Feb 28 06:22:01 CST 2019
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?
> + 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.
More information about the wine-devel
mailing list