Merge branch 'master' into allocation_defragmentation_strategies

# Conflicts:
#	docs/html/vk__mem__alloc_8h_source.html
This commit is contained in:
Adam Sawicki 2018-12-06 14:52:11 +01:00
commit 0eeed59309
3 changed files with 8 additions and 4 deletions

View File

@ -216,7 +216,7 @@ Public Attributes</h2></td></tr>
<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> <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>
<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> <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>
</ul> </ul>
<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> <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>
</div> </div>
</div> </div>

View File

@ -8,7 +8,8 @@
#include <Windows.h> #include <Windows.h>
#define VK_USE_PLATFORM_WIN32_KHR #define VK_USE_PLATFORM_WIN32_KHR
#include <vulkan/vulkan.h> // Uncomment to test including `vulkan.h` on your own before including VMA.
//#include <vulkan/vulkan.h>
/* /*
In every place where you want to use Vulkan Memory Allocator, define appropriate In every place where you want to use Vulkan Memory Allocator, define appropriate

View File

@ -1493,7 +1493,9 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
#define NOMINMAX // For windows.h #define NOMINMAX // For windows.h
#endif #endif
#ifndef VULKAN_H_
#include <vulkan/vulkan.h> #include <vulkan/vulkan.h>
#endif
#if VMA_RECORDING_ENABLED #if VMA_RECORDING_ENABLED
#include <windows.h> #include <windows.h>
@ -1690,7 +1692,8 @@ typedef struct VmaAllocatorCreateInfo
smaller amount of memory, because graphics driver doesn't necessary fail new smaller amount of memory, because graphics driver doesn't necessary fail new
allocations with `VK_ERROR_OUT_OF_DEVICE_MEMORY` result when memory capacity is allocations with `VK_ERROR_OUT_OF_DEVICE_MEMORY` result when memory capacity is
exceeded. It may return success and just silently migrate some device memory exceeded. It may return success and just silently migrate some device memory
blocks to system RAM. blocks to system RAM. This driver behavior can also be controlled using
VK_AMD_memory_overallocation_behavior extension.
*/ */
const VkDeviceSize* pHeapSizeLimit; const VkDeviceSize* pHeapSizeLimit;
/** \brief Pointers to Vulkan functions. Can be null if you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1`. /** \brief Pointers to Vulkan functions. Can be null if you leave define `VMA_STATIC_VULKAN_FUNCTIONS 1`.