1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxvk] Tweak staging memory allocation behaviour

This commit is contained in:
Philip Rebohle 2024-10-07 13:32:46 +02:00
parent 813524c146
commit 571a2d5811

View File

@ -458,6 +458,12 @@ namespace dxvk {
type.devicePool.maxChunkSize = determineMaxChunkSize(type, false);
type.mappedPool.maxChunkSize = determineMaxChunkSize(type, true);
// Uncached system memory is going to be used for large temporary allocations
// during resource creation. Account for that by always using full-sized chunks.
if ((type.properties.propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT)
&& !(type.properties.propertyFlags & (VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT)))
type.mappedPool.nextChunkSize = type.mappedPool.maxChunkSize;
}
determineMemoryTypesWithPropertyFlags();