mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 07:24:15 +01:00
[dxvk] Remove old memory budget code
Obsolete since we removed the Nvidia HVV workaround for old drivers. Closes #3877.
This commit is contained in:
parent
0a699fddb6
commit
fd3fbf6607
@ -188,7 +188,6 @@ namespace dxvk {
|
|||||||
for (uint32_t i = 0; i < m_memProps.memoryHeapCount; i++) {
|
for (uint32_t i = 0; i < m_memProps.memoryHeapCount; i++) {
|
||||||
m_memHeaps[i].properties = m_memProps.memoryHeaps[i];
|
m_memHeaps[i].properties = m_memProps.memoryHeaps[i];
|
||||||
m_memHeaps[i].stats = DxvkMemoryStats { 0, 0 };
|
m_memHeaps[i].stats = DxvkMemoryStats { 0, 0 };
|
||||||
m_memHeaps[i].budget = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint32_t i = 0; i < m_memProps.memoryTypeCount; i++) {
|
for (uint32_t i = 0; i < m_memProps.memoryTypeCount; i++) {
|
||||||
@ -385,9 +384,6 @@ namespace dxvk {
|
|||||||
bool useMemoryPriority = (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
|
bool useMemoryPriority = (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
|
||||||
&& (m_device->features().extMemoryPriority.memoryPriority);
|
&& (m_device->features().extMemoryPriority.memoryPriority);
|
||||||
|
|
||||||
if (type->heap->budget && type->heap->stats.memoryAllocated + size > type->heap->budget)
|
|
||||||
return DxvkDeviceMemory();
|
|
||||||
|
|
||||||
float priority = 0.0f;
|
float priority = 0.0f;
|
||||||
|
|
||||||
if (hints.test(DxvkMemoryFlag::GpuReadable))
|
if (hints.test(DxvkMemoryFlag::GpuReadable))
|
||||||
@ -547,11 +543,7 @@ namespace dxvk {
|
|||||||
bool DxvkMemoryAllocator::shouldFreeEmptyChunks(
|
bool DxvkMemoryAllocator::shouldFreeEmptyChunks(
|
||||||
const DxvkMemoryHeap* heap,
|
const DxvkMemoryHeap* heap,
|
||||||
VkDeviceSize allocationSize) const {
|
VkDeviceSize allocationSize) const {
|
||||||
VkDeviceSize budget = heap->budget;
|
VkDeviceSize budget = (heap->properties.size * 4) / 5;
|
||||||
|
|
||||||
if (!budget)
|
|
||||||
budget = (heap->properties.size * 4) / 5;
|
|
||||||
|
|
||||||
return heap->stats.memoryAllocated + allocationSize > budget;
|
return heap->stats.memoryAllocated + allocationSize > budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,6 @@ namespace dxvk {
|
|||||||
struct DxvkMemoryHeap {
|
struct DxvkMemoryHeap {
|
||||||
VkMemoryHeap properties;
|
VkMemoryHeap properties;
|
||||||
DxvkMemoryStats stats;
|
DxvkMemoryStats stats;
|
||||||
VkDeviceSize budget;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user