* We don't replay it, all resources are resident on replay. At record time we
need to know the residency status to make resources resident when necessary.
* DXGI is entangled with the API unfortunately, such that for D3D11
DXGI_SWAP_EFFECT_FLIP_DISCARD can only access buffer 0 (like
DXGI_SWAP_EFFECT_DISCARD) but for D3D12 it can access any buffer. This is
naturally undocumented.
* On D3D11 we just queried the resource & sampler binding from whichever stage
it was on and bound it to the pixel shader. On D3D12 we re-use the root
signature which means we need to fetch the binding in the stage it was used
originally. VS t0,space0 could be different from PS t0,space0.
* This can lead to lifetime issues if the allocator is reset and now the
external-data pointer or bool can be trashed. Instead if the data allocation
can't come from the allocator, allocate both data and chunk externally.
* When capturing some external memory driver implementations have completely
disjoint memory type bits allowed for external and non-external resources.
This means it is impossible to capture it as external and then replay it as
non-external, leading to a broken capture.
* This is warned about at capture time but easy to miss. Adding this error here
is more likely to be seen and found.
Updated vk_next_chains.cpp to handle serializing of the new structs
Updated VkCreateInfo function to check for Android External Buffer
Fixes to vk_serialize.cpp to serialize structs properly
Added initial support for these structs:
*VkAndroidHardwareBufferPropertiesANDROID
*VkMemoryGetAndroidHardwareBufferInfoANDROID
*VkAndroidHardwareBufferFormatPropertiesANDROID
*VkExternalFormatANDROID
*VkAndroidHardwareBufferUsageANDROID
*VkImportAndroidHardwareBufferInfoANDROID
Added support for the VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER
device extension on Android
*Created necessary hooks for vkGetAndroidHardwareBufferPropertiesANDROID
and vkGetMemoryAndroidHardwareBufferANDROID
* In heavy D3D11 workloads the refcounting overhead especially during fast
binding changes was significant. Refactoring the refcounting to work on a
different model and deferring destruction of objects removes most of the
overhead.
* The cost of searching a few more pools to check allocations isn't so bad
especially if we can move IsAlloc() off the hot path. Better that than
allocating 100MB in pools.