Skip to content

Commit 0eeed59

Browse files
Merge branch 'master' into allocation_defragmentation_strategies
# Conflicts: # docs/html/vk__mem__alloc_8h_source.html
2 parents 647cf24 + e8b0148 commit 0eeed59

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/html/struct_vma_allocator_create_info.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a31c192aa6cbffa33279f6d9f
216216
<li>If user tries to allocate more memory from that heap using this allocator, the allocation fails with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code>.</li>
217217
<li>If the limit is smaller than heap size reported in <code>VkMemoryHeap::size</code>, the value of this limit will be reported instead when using <a class="el" href="vk__mem__alloc_8h.html#ab88db292a17974f911182543fda52d19">vmaGetMemoryProperties()</a>.</li>
218218
</ul>
219-
<p>Warning! Using this feature may not be equivalent to installing a GPU with smaller amount of memory, because graphics driver doesn't necessary fail new allocations with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code> result when memory capacity is exceeded. It may return success and just silently migrate some device memory blocks to system RAM. </p>
219+
<p>Warning! Using this feature may not be equivalent to installing a GPU with smaller amount of memory, because graphics driver doesn't necessary fail new allocations with <code>VK_ERROR_OUT_OF_DEVICE_MEMORY</code> result when memory capacity is exceeded. It may return success and just silently migrate some device memory blocks to system RAM. This driver behavior can also be controlled using VK_AMD_memory_overallocation_behavior extension. </p>
220220

221221
</div>
222222
</div>

src/VmaUsage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include <Windows.h>
99
#define VK_USE_PLATFORM_WIN32_KHR
1010

11-
#include <vulkan/vulkan.h>
11+
// Uncomment to test including `vulkan.h` on your own before including VMA.
12+
//#include <vulkan/vulkan.h>
1213

1314
/*
1415
In every place where you want to use Vulkan Memory Allocator, define appropriate

src/vk_mem_alloc.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,9 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
14931493
#define NOMINMAX // For windows.h
14941494
#endif
14951495

1496-
#include <vulkan/vulkan.h>
1496+
#ifndef VULKAN_H_
1497+
#include <vulkan/vulkan.h>
1498+
#endif
14971499

14981500
#if VMA_RECORDING_ENABLED
14991501
#include <windows.h>
@@ -1690,7 +1692,8 @@ typedef struct VmaAllocatorCreateInfo
16901692
smaller amount of memory, because graphics driver doesn't necessary fail new
16911693
allocations with `VK_ERROR_OUT_OF_DEVICE_MEMORY` result when memory capacity is
16921694
exceeded. It may return success and just silently migrate some device memory
1693-
blocks to system RAM.
1695+
blocks to system RAM. This driver behavior can also be controlled using
1696+
VK_AMD_memory_overallocation_behavior extension.
16941697
*/
16951698
const VkDeviceSize* pHeapSizeLimit;
16961699
/** \brief Pointers to Vulkan functions. Can be null if you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1`.

0 commit comments

Comments
 (0)