mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Allow overcommitting non-device local memory
If allocations on host-local memory types fail, we can rely on Vulkan's error reporting. May fix issues on systems with small amounts of VRAM.
This commit is contained in:
parent
c600b43d73
commit
3b70e23e2c
@ -191,7 +191,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
DxvkMemoryStats DxvkMemoryAllocator::getMemoryStats() {
|
DxvkMemoryStats DxvkMemoryAllocator::getMemoryStats() {
|
||||||
std::lock_guard<std::mutex> lock(m_mutex);
|
std::lock_guard<std::mutex> lock(m_mutex);
|
||||||
|
|
||||||
DxvkMemoryStats totalStats;
|
DxvkMemoryStats totalStats;
|
||||||
|
|
||||||
for (size_t i = 0; i < m_memProps.memoryHeapCount; i++) {
|
for (size_t i = 0; i < m_memProps.memoryHeapCount; i++) {
|
||||||
@ -260,7 +260,8 @@ namespace dxvk {
|
|||||||
DxvkDeviceMemory DxvkMemoryAllocator::tryAllocDeviceMemory(
|
DxvkDeviceMemory DxvkMemoryAllocator::tryAllocDeviceMemory(
|
||||||
DxvkMemoryType* type,
|
DxvkMemoryType* type,
|
||||||
VkDeviceSize size) {
|
VkDeviceSize size) {
|
||||||
if (type->heap->stats.memoryAllocated + size > type->heap->properties.size)
|
if ((type->memType.propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
|
||||||
|
&& (type->heap->stats.memoryAllocated + size > type->heap->properties.size))
|
||||||
return DxvkDeviceMemory();
|
return DxvkDeviceMemory();
|
||||||
|
|
||||||
DxvkDeviceMemory result;
|
DxvkDeviceMemory result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user