* 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.
* By default cmake will print huge scary warnings if the packages aren't
available instead of silently continuing and letting us check, which is a bad
default for optional packages.
* We only enable this if we find an existing struct somewhere enabling the base
feature. Otherwise we might try to enable this when it's not supported at all.
* We used to get this 'for free' by serialising our patched device next chains,
but we no longer do that so we need to enable this bit on replay as well.
* If we insert chunks next to the recorded commands for indirect draws we need
to update all other commands which are recorded but not submitted which have
chunk indices. Updating this could be very complex if the command buffer
record is only partially complete when the submit happens (which is quite
possible if it's not submitted until later), so instead we abandon trying to
have indirect chunks next to the recorded command chunks since it's not
strictly necessary.
* EXT_transform_feedback allow us to use what we want and is core in the minimum
replay version (3.0 for GL/GLES), but it doesn't include separate xfb objects.