Skip to content

Commit

Permalink
Final fixes before v2.2.0 release. Minor fixes after tests. Rebuilt b…
Browse files Browse the repository at this point in the history
…inaries and documentation again.
  • Loading branch information
adam-sawicki-a committed Dec 13, 2018
1 parent 1a8424f commit bdb89a9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
Binary file modified bin/VmaReplay_Release_vs2017.exe
Binary file not shown.
Binary file modified bin/VulkanSample_Release_vs2017.exe
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/html/vk__mem__alloc_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ad37e82e492b3de38fc3f4cff
<tr><td class="paramdir"></td><td class="paramname">pCreateInfo</td><td>Creation parameters for each alloction. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">allocationCount</td><td>Number of allocations to make. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocations</td><td>Pointer to array that will be filled with handles to created allocations. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pAlocationInfo</td><td>Optional. Pointer to array that will be filled with parameters of created allocations.</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pAllocationInfo</td><td>Optional. Pointer to array that will be filled with parameters of created allocations.</td></tr>
</table>
</dd>
</dl>
Expand Down Expand Up @@ -1873,10 +1873,10 @@ <h2 class="memtitle"><span class="permalink"><a href="#a36ba776fd7fd5cb1e9359fdc
<p>Begins defragmentation process. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">allocator</td><td>Allocator object. </td></tr>
<tr><td class="paramname">pInfo</td><td>Structure filled with parameters of defragmentation. </td></tr>
<tr><td class="paramname">pStats[out]</td><td>Optional. Statistics of defragmentation. You can pass null if you are not interested in this information. </td></tr>
<tr><td class="paramname">pContext[out]</td><td>Context object that must be passed to <a class="el" href="vk__mem__alloc_8h.html#a8774e20e91e245aae959ba63efa15dd2" title="Ends defragmentation process. ">vmaDefragmentationEnd()</a> to finish defragmentation. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">allocator</td><td>Allocator object. </td></tr>
<tr><td class="paramdir"></td><td class="paramname">pInfo</td><td>Structure filled with parameters of defragmentation. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pStats</td><td>Optional. Statistics of defragmentation. You can pass null if you are not interested in this information. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">pContext</td><td>Context object that must be passed to <a class="el" href="vk__mem__alloc_8h.html#a8774e20e91e245aae959ba63efa15dd2" title="Ends defragmentation process. ">vmaDefragmentationEnd()</a> to finish defragmentation. </td></tr>
</table>
</dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/vk__mem__alloc_8h_source.html

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ extern VkCommandBuffer g_hTemporaryCommandBuffer;
void BeginSingleTimeCommands();
void EndSingleTimeCommands();

#ifndef VMA_DEBUG_MARGIN
#define VMA_DEBUG_MARGIN 0
#endif

enum CONFIG_TYPE {
CONFIG_TYPE_MINIMUM,
CONFIG_TYPE_SMALL,
Expand Down Expand Up @@ -1379,6 +1383,7 @@ void TestDefragmentationSimple()
Allocation that must be move to an overlapping place using memmove().
Create 2 buffers, second slightly bigger than the first. Delete first. Then defragment.
*/
if(VMA_DEBUG_MARGIN == 0) // FAST algorithm works only when DEBUG_MARGIN disabled.
{
AllocInfo allocInfo[2];

Expand Down
9 changes: 3 additions & 6 deletions src/vk_mem_alloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2499,7 +2499,7 @@ VkResult vmaAllocateMemory(
@param pCreateInfo Creation parameters for each alloction.
@param allocationCount Number of allocations to make.
@param[out] pAllocations Pointer to array that will be filled with handles to created allocations.
@param[out] pAlocationInfo Optional. Pointer to array that will be filled with parameters of created allocations.
@param[out] pAllocationInfo Optional. Pointer to array that will be filled with parameters of created allocations.

You should free the memory using vmaFreeMemory() or vmaFreeMemoryPages().

Expand Down Expand Up @@ -2875,8 +2875,8 @@ typedef struct VmaDefragmentationStats {

@param allocator Allocator object.
@param pInfo Structure filled with parameters of defragmentation.
@param pStats[out] Optional. Statistics of defragmentation. You can pass null if you are not interested in this information.
@param pContext[out] Context object that must be passed to vmaDefragmentationEnd() to finish defragmentation.
@param[out] pStats Optional. Statistics of defragmentation. You can pass null if you are not interested in this information.
@param[out] pContext Context object that must be passed to vmaDefragmentationEnd() to finish defragmentation.
@return `VK_SUCCESS` and `*pContext == null` if defragmentation finished within this function call. `VK_NOT_READY` and `*pContext != null` if defragmentation has been started and you need to call vmaDefragmentationEnd() to finish it. Negative value in case of error.

Use this function instead of old, deprecated vmaDefragment().
Expand Down Expand Up @@ -6272,9 +6272,6 @@ class VmaDefragmentationAlgorithm_Fast : public VmaDefragmentationAlgorithm

struct VmaBlockDefragmentationContext
{
private:
VMA_CLASS_NO_COPY(VmaBlockDefragmentationContext)
public:
enum BLOCK_FLAG
{
BLOCK_FLAG_USED = 0x00000001,
Expand Down

0 comments on commit bdb89a9

Please sign in to comment.