On Thu, Feb 28, 2019 at 1:22 PM Henri Verbeet hverbeet@gmail.com wrote:
On Wed, 27 Feb 2019 at 21:01, Matteo Bruni mbruni@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!