Am 25.02.2022 um 20:17 schrieb Zebediah Figura zfigura@codeweavers.com:
heap_free((void *)op->bo.addr.addr);
- }
...
- if (!(map_desc->data = heap_alloc(size)))
Just an fyi, and I guess you're already aware of it anyhow: HeapAlloc / HeapFree here can be quite expensive; I found it benefitial to cache those memory allocations, similarly to how we cache Vulcan / GL side buffers.
Though the broader design question is if said optimization should be in wined3d or ntdll.
I had pretty good results in my old CSMT with having just one upload allocation cached per resource. That way we don't have to search for a matching slab in a big-ish cache, but otoh free and re-alloc a few times. But AFAIR it reduced the amount of alloc / frees by 90% or so,