On 9/30/19 9:40 PM, Henri Verbeet wrote:
On Mon, 30 Sep 2019 at 17:48, Hans-Kristian Arntzen post@arntzen-software.no wrote:
Greatly reduces number of maps for applications which do not do this themselves. Also add a config option to use older map-on-demand behavior, which might be nice for debugging tools.
I don't want to just say no, but this does seem to go against the spirit of an "explicit" API like d3d12 somewhat. My other concern with this is that while on 64-bit we typically have plenty of address space, things can be a bit more tight on 32-bit. I assume the main justification for this patch is performance; do you have some numbers?
FWIW, I tried this on a native D3D12 and Map/Unmap of single resources seems to behave in a very similar way to the existing implementation. vkMapMemory is actually faster than ID3D12Resource::Map, so probably fine to just drop this patch.
Cheers, Hans-Kristian