From ab0b39a783042d66d56d8ea5c9dc4a21bdde212b Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Fri, 22 Sep 2017 16:57:38 +0200 Subject: [PATCH] Added structure VmaVulkanFunctions, macro VMA_STATIC_VULKAN_FUNCTIONS. --- docs/html/annotated.html | 1 + docs/html/classes.html | 2 +- docs/html/functions.html | 49 +++ docs/html/functions_vars.html | 49 +++ docs/html/globals.html | 6 + docs/html/globals_type.html | 6 + docs/html/group__general.html | 37 ++ docs/html/index.html | 10 +- docs/html/menudata.js | 6 +- docs/html/search/all_8.js | 3 +- docs/html/search/all_d.js | 19 +- docs/html/search/classes_0.js | 3 +- docs/html/search/searchdata.js | 2 +- docs/html/search/typedefs_1.js | 4 +- docs/html/search/variables_6.js | 3 +- docs/html/search/variables_b.html | 26 ++ docs/html/search/variables_b.js | 17 + ...uct_vma_allocator_create_info-members.html | 1 + .../struct_vma_allocator_create_info.html | 21 ++ .../struct_vma_vulkan_functions-members.html | 90 +++++ docs/html/struct_vma_vulkan_functions.html | 310 ++++++++++++++++ docs/html/vk__mem__alloc_8h.html | 7 + docs/html/vk__mem__alloc_8h_source.html | 196 ++++++----- src/vk_mem_alloc.h | 331 +++++++++++++----- 24 files changed, 1002 insertions(+), 197 deletions(-) create mode 100644 docs/html/search/variables_b.html create mode 100644 docs/html/search/variables_b.js create mode 100644 docs/html/struct_vma_vulkan_functions-members.html create mode 100644 docs/html/struct_vma_vulkan_functions.html diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 1872afc..d32117e 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -74,6 +74,7 @@ $(function() {  CVmaPoolStatsDescribes parameter of existing VmaPool  CVmaStatInfo  CVmaStatsGeneral statistics from current state of Allocator + CVmaVulkanFunctions diff --git a/docs/html/classes.html b/docs/html/classes.html index ac33cf4..bbb29c7 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -65,7 +65,7 @@ $(function() {
v
+ diff --git a/docs/html/functions.html b/docs/html/functions.html index 52a24bc..b1b9dbd 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -195,6 +195,9 @@ $(function() { : VmaAllocationCreateInfo , VmaAllocationInfo +
  • pVulkanFunctions +: VmaAllocatorCreateInfo +
  • @@ -249,6 +252,52 @@ $(function() { : VmaStatInfo + + +

    - v -

    + + @@ -104,11 +106,16 @@ Typedefs + + + + +
      v  
    -
    VmaAllocationInfo   VmaDefragmentationStats   VmaPoolStats   
    VmaAllocationInfo   VmaDefragmentationStats   VmaPoolStats   VmaVulkanFunctions   
    VmaAllocatorCreateInfo   VmaDeviceMemoryCallbacks   VmaStatInfo   
    VmaAllocationCreateInfo   VmaDefragmentationInfo   VmaPoolCreateInfo   VmaStats   
    struct  VmaDeviceMemoryCallbacks
     Set of callbacks that the library will call for vkAllocateMemory and vkFreeMemory. More...
     
    struct  VmaVulkanFunctions
     
    struct  VmaAllocatorCreateInfo
     Description of a Allocator to be created. More...
     
     
    typedef VkFlags VmaAllocatorFlags
     
    typedef struct VmaVulkanFunctions VmaVulkanFunctions
     
    typedef struct VmaAllocatorCreateInfo VmaAllocatorCreateInfo
     Description of a Allocator to be created. More...
     
    typedef struct VmaStatInfo VmaStatInfo
     
    typedef struct VmaStats VmaStats
     General statistics from current state of Allocator. More...
     
    @@ -269,6 +276,36 @@ Functions

    Enumerations

    +
    + + +

    ◆ VmaStats

    + +
    +
    + + + + +
    typedef struct VmaStats VmaStats
    +
    + +

    General statistics from current state of Allocator.

    + +
    +
    + +

    ◆ VmaVulkanFunctions

    + +
    +
    + + + + +
    typedef struct VmaVulkanFunctions VmaVulkanFunctions
    +
    +

    Enumeration Type Documentation

    diff --git a/docs/html/index.html b/docs/html/index.html index e6f3b54..a4e5c40 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -73,7 +73,8 @@ $(function() {
  • Lost allocations
  • -
  • Configuration
    • Custom host memory allocator
    • +
    • Configuration @@ -298,6 +299,13 @@ void MyBuffer::EnsureBuffer()

      Configuration

      Please check "CONFIGURATION SECTION" in the code to find macros that you can define before each #include of this file or change directly in this file to provide your own implementation of basic facilities like assert, min() and max() functions, mutex etc. C++ STL is used by default, but changing these allows you to get rid of any STL usage if you want, as many game developers tend to do.

      +

      +Pointers to Vulkan functions

      +

      The library uses Vulkan functions straight from the vulkan.h header by default. If you want to provide your own pointers to these functions, e.g. fetched using vkGetInstanceProcAddr and vkGetDeviceProcAddr:

      +
        +
      1. Remove macro VMA_STATIC_VULKAN_FUNCTIONS from "CONFIGURATION SECTION" section.
      2. +
      3. Provide valid pointers through VmaAllocatorCreateInfo::pVulkanFunctions.
      4. +

      Custom host memory allocator

      If you use custom allocator for CPU memory rather than default operator new and delete from C++, you can make this library using your allocator as well by filling optional member VmaAllocatorCreateInfo::pAllocationCallbacks. These functions will be passed to Vulkan, as well as used by the library itself to make any CPU-side allocations.

      diff --git a/docs/html/menudata.js b/docs/html/menudata.js index 196cc20..2d85bf9 100644 --- a/docs/html/menudata.js +++ b/docs/html/menudata.js @@ -16,7 +16,8 @@ var menudata={children:[ {text:"r",url:"functions.html#index_r"}, {text:"s",url:"functions.html#index_s"}, {text:"t",url:"functions.html#index_t"}, -{text:"u",url:"functions.html#index_u"}]}, +{text:"u",url:"functions.html#index_u"}, +{text:"v",url:"functions.html#index_v"}]}, {text:"Variables",url:"functions_vars.html",children:[ {text:"a",url:"functions_vars.html#index_a"}, {text:"b",url:"functions_vars.html#index_b"}, @@ -28,7 +29,8 @@ var menudata={children:[ {text:"r",url:"functions_vars.html#index_r"}, {text:"s",url:"functions_vars.html#index_s"}, {text:"t",url:"functions_vars.html#index_t"}, -{text:"u",url:"functions_vars.html#index_u"}]}]}]}, +{text:"u",url:"functions_vars.html#index_u"}, +{text:"v",url:"functions_vars.html#index_v"}]}]}]}, {text:"Files",url:"files.html",children:[ {text:"File List",url:"files.html"}, {text:"File Members",url:"globals.html",children:[ diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index 7e837ac..8220107 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -13,5 +13,6 @@ var searchData= ['preferredflags',['preferredFlags',['../struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d',1,'VmaAllocationCreateInfo']]], ['preferredlargeheapblocksize',['preferredLargeHeapBlockSize',['../struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a',1,'VmaAllocatorCreateInfo']]], ['preferredsmallheapblocksize',['preferredSmallHeapBlockSize',['../struct_vma_allocator_create_info.html#ab435423d84d5ab26e2c347c51771f90a',1,'VmaAllocatorCreateInfo']]], - ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]] + ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]], + ['pvulkanfunctions',['pVulkanFunctions',['../struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd',1,'VmaAllocatorCreateInfo']]] ]; diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js index fb398e6..16be3ae 100644 --- a/docs/html/search/all_d.js +++ b/docs/html/search/all_d.js @@ -2,6 +2,20 @@ var searchData= [ ['vulkan_20memory_20allocator',['Vulkan Memory Allocator',['../index.html',1,'']]], ['vk_5fmem_5falloc_2eh',['vk_mem_alloc.h',['../vk__mem__alloc_8h.html',1,'']]], + ['vkallocatememory',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]], + ['vkbindbuffermemory',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]], + ['vkbindimagememory',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]], + ['vkcreatebuffer',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]], + ['vkcreateimage',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]], + ['vkdestroybuffer',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]], + ['vkdestroyimage',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]], + ['vkfreememory',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]], + ['vkgetbuffermemoryrequirements',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]], + ['vkgetimagememoryrequirements',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]], + ['vkgetphysicaldevicememoryproperties',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]], + ['vkgetphysicaldeviceproperties',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]], + ['vkmapmemory',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]], + ['vkunmapmemory',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]], ['vma_5fallocation_5fcreate_5fcan_5fbecome_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_BECOME_LOST_BIT',['../group__layer1.html#ggad9889c10c798b040d59c92f257cae597a5f436af6c8fe8540573a6d22627a6fd2',1,'vk_mem_alloc.h']]], ['vma_5fallocation_5fcreate_5fcan_5fmake_5fother_5flost_5fbit',['VMA_ALLOCATION_CREATE_CAN_MAKE_OTHER_LOST_BIT',['../group__layer1.html#ggad9889c10c798b040d59c92f257cae597a68686d0ce9beb0d4d1b9f2b8b1389a7e',1,'vk_mem_alloc.h']]], ['vma_5fallocation_5fcreate_5fflag_5fbits_5fmax_5fenum',['VMA_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM',['../group__layer1.html#ggad9889c10c798b040d59c92f257cae597ae5633ec569f4899cf8f29e7385b2f882',1,'vk_mem_alloc.h']]], @@ -64,7 +78,8 @@ var searchData= ['vmasetallocationuserdata',['vmaSetAllocationUserData',['../group__layer2.html#gaf9147d31ffc11d62fc187bde283ed14f',1,'vk_mem_alloc.h']]], ['vmasetcurrentframeindex',['vmaSetCurrentFrameIndex',['../group__general.html#gade56bf8dc9f5a5eaddf5f119ed525236',1,'vk_mem_alloc.h']]], ['vmastatinfo',['VmaStatInfo',['../struct_vma_stat_info.html',1,'VmaStatInfo'],['../group__general.html#ga810b009a788ee8aac72a25b42ffbe31c',1,'VmaStatInfo(): vk_mem_alloc.h']]], - ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'']]], + ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'VmaStats'],['../group__general.html#ga732be855fb4a7c248e6853d928a729af',1,'VmaStats(): vk_mem_alloc.h']]], ['vmaunmapmemory',['vmaUnmapMemory',['../group__layer2.html#ga9bc268595cb33f6ec4d519cfce81ff45',1,'vk_mem_alloc.h']]], - ['vmaunmappersistentlymappedmemory',['vmaUnmapPersistentlyMappedMemory',['../group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27',1,'vk_mem_alloc.h']]] + ['vmaunmappersistentlymappedmemory',['vmaUnmapPersistentlyMappedMemory',['../group__layer2.html#ga26b87244491c1fe77f11fe9ab5779c27',1,'vk_mem_alloc.h']]], + ['vmavulkanfunctions',['VmaVulkanFunctions',['../struct_vma_vulkan_functions.html',1,'VmaVulkanFunctions'],['../group__general.html#ga97064a1a271b0061ebfc3a079862d0c5',1,'VmaVulkanFunctions(): vk_mem_alloc.h']]] ]; diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js index b559087..6fa18bb 100644 --- a/docs/html/search/classes_0.js +++ b/docs/html/search/classes_0.js @@ -9,5 +9,6 @@ var searchData= ['vmapoolcreateinfo',['VmaPoolCreateInfo',['../struct_vma_pool_create_info.html',1,'']]], ['vmapoolstats',['VmaPoolStats',['../struct_vma_pool_stats.html',1,'']]], ['vmastatinfo',['VmaStatInfo',['../struct_vma_stat_info.html',1,'']]], - ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'']]] + ['vmastats',['VmaStats',['../struct_vma_stats.html',1,'']]], + ['vmavulkanfunctions',['VmaVulkanFunctions',['../struct_vma_vulkan_functions.html',1,'']]] ]; diff --git a/docs/html/search/searchdata.js b/docs/html/search/searchdata.js index a0bcb94..5079fb4 100644 --- a/docs/html/search/searchdata.js +++ b/docs/html/search/searchdata.js @@ -4,7 +4,7 @@ var indexSectionsWithContent = 1: "v", 2: "v", 3: "v", - 4: "abdfmoprstu", + 4: "abdfmoprstuv", 5: "pv", 6: "v", 7: "v", diff --git a/docs/html/search/typedefs_1.js b/docs/html/search/typedefs_1.js index 7b9e407..6afe357 100644 --- a/docs/html/search/typedefs_1.js +++ b/docs/html/search/typedefs_1.js @@ -15,5 +15,7 @@ var searchData= ['vmapoolcreateflags',['VmaPoolCreateFlags',['../group__layer2.html#ga2770e325ea42e087c1b91fdf46d0292a',1,'vk_mem_alloc.h']]], ['vmapoolcreateinfo',['VmaPoolCreateInfo',['../group__layer2.html#ga211706e9348dcee25a843ed4ea69bce7',1,'vk_mem_alloc.h']]], ['vmapoolstats',['VmaPoolStats',['../group__layer2.html#ga2e5612d871d64c5624087b837a338c34',1,'vk_mem_alloc.h']]], - ['vmastatinfo',['VmaStatInfo',['../group__general.html#ga810b009a788ee8aac72a25b42ffbe31c',1,'vk_mem_alloc.h']]] + ['vmastatinfo',['VmaStatInfo',['../group__general.html#ga810b009a788ee8aac72a25b42ffbe31c',1,'vk_mem_alloc.h']]], + ['vmastats',['VmaStats',['../group__general.html#ga732be855fb4a7c248e6853d928a729af',1,'vk_mem_alloc.h']]], + ['vmavulkanfunctions',['VmaVulkanFunctions',['../group__general.html#ga97064a1a271b0061ebfc3a079862d0c5',1,'vk_mem_alloc.h']]] ]; diff --git a/docs/html/search/variables_6.js b/docs/html/search/variables_6.js index 9113c5c..a6957a7 100644 --- a/docs/html/search/variables_6.js +++ b/docs/html/search/variables_6.js @@ -11,5 +11,6 @@ var searchData= ['preferredflags',['preferredFlags',['../struct_vma_allocation_create_info.html#a7fe8d81a1ad10b2a2faacacee5b15d6d',1,'VmaAllocationCreateInfo']]], ['preferredlargeheapblocksize',['preferredLargeHeapBlockSize',['../struct_vma_allocator_create_info.html#a8e4714298e3121cdd8b214a1ae7a637a',1,'VmaAllocatorCreateInfo']]], ['preferredsmallheapblocksize',['preferredSmallHeapBlockSize',['../struct_vma_allocator_create_info.html#ab435423d84d5ab26e2c347c51771f90a',1,'VmaAllocatorCreateInfo']]], - ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]] + ['puserdata',['pUserData',['../struct_vma_allocation_create_info.html#a8259e85c272683434f4abb4ddddffe19',1,'VmaAllocationCreateInfo::pUserData()'],['../struct_vma_allocation_info.html#adc507656149c04de7ed95d0042ba2a13',1,'VmaAllocationInfo::pUserData()']]], + ['pvulkanfunctions',['pVulkanFunctions',['../struct_vma_allocator_create_info.html#a3dc197be3227da7338b1643f70db36bd',1,'VmaAllocatorCreateInfo']]] ]; diff --git a/docs/html/search/variables_b.html b/docs/html/search/variables_b.html new file mode 100644 index 0000000..ea46965 --- /dev/null +++ b/docs/html/search/variables_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
      +
      Loading...
      +
      + +
      Searching...
      +
      No Matches
      + +
      + + diff --git a/docs/html/search/variables_b.js b/docs/html/search/variables_b.js new file mode 100644 index 0000000..e40881e --- /dev/null +++ b/docs/html/search/variables_b.js @@ -0,0 +1,17 @@ +var searchData= +[ + ['vkallocatememory',['vkAllocateMemory',['../struct_vma_vulkan_functions.html#a2943bf99dfd784a0e8f599d987e22e6c',1,'VmaVulkanFunctions']]], + ['vkbindbuffermemory',['vkBindBufferMemory',['../struct_vma_vulkan_functions.html#a94fc4f3a605d9880bb3c0ba2c2fc80b2',1,'VmaVulkanFunctions']]], + ['vkbindimagememory',['vkBindImageMemory',['../struct_vma_vulkan_functions.html#a1338d96a128a5ade648b8d934907c637',1,'VmaVulkanFunctions']]], + ['vkcreatebuffer',['vkCreateBuffer',['../struct_vma_vulkan_functions.html#ae8084315a25006271a2edfc3a447519f',1,'VmaVulkanFunctions']]], + ['vkcreateimage',['vkCreateImage',['../struct_vma_vulkan_functions.html#a23ebe70be515b9b5010a1d691200e325',1,'VmaVulkanFunctions']]], + ['vkdestroybuffer',['vkDestroyBuffer',['../struct_vma_vulkan_functions.html#a7e054606faddb07f0e8556f3ed317d45',1,'VmaVulkanFunctions']]], + ['vkdestroyimage',['vkDestroyImage',['../struct_vma_vulkan_functions.html#a90b898227039b1dcb3520f6e91f09ffa',1,'VmaVulkanFunctions']]], + ['vkfreememory',['vkFreeMemory',['../struct_vma_vulkan_functions.html#a4c658701778564d62034255b5dda91b4',1,'VmaVulkanFunctions']]], + ['vkgetbuffermemoryrequirements',['vkGetBufferMemoryRequirements',['../struct_vma_vulkan_functions.html#a5b92901df89a4194b0d12f6071d4d143',1,'VmaVulkanFunctions']]], + ['vkgetimagememoryrequirements',['vkGetImageMemoryRequirements',['../struct_vma_vulkan_functions.html#a475f6f49f8debe4d10800592606d53f4',1,'VmaVulkanFunctions']]], + ['vkgetphysicaldevicememoryproperties',['vkGetPhysicalDeviceMemoryProperties',['../struct_vma_vulkan_functions.html#a60d25c33bba06bb8592e6875cbaa9830',1,'VmaVulkanFunctions']]], + ['vkgetphysicaldeviceproperties',['vkGetPhysicalDeviceProperties',['../struct_vma_vulkan_functions.html#a77b7a74082823e865dd6546623468f96',1,'VmaVulkanFunctions']]], + ['vkmapmemory',['vkMapMemory',['../struct_vma_vulkan_functions.html#ab5c1f38dea3a2cf00dc9eb4f57218c49',1,'VmaVulkanFunctions']]], + ['vkunmapmemory',['vkUnmapMemory',['../struct_vma_vulkan_functions.html#acc798589736f0becb317fc2196c1d8b9',1,'VmaVulkanFunctions']]] +]; diff --git a/docs/html/struct_vma_allocator_create_info-members.html b/docs/html/struct_vma_allocator_create_info-members.html index 629a078..f072974 100644 --- a/docs/html/struct_vma_allocator_create_info-members.html +++ b/docs/html/struct_vma_allocator_create_info-members.html @@ -74,6 +74,7 @@ $(function() { physicalDeviceVmaAllocatorCreateInfo preferredLargeHeapBlockSizeVmaAllocatorCreateInfo preferredSmallHeapBlockSizeVmaAllocatorCreateInfo + pVulkanFunctionsVmaAllocatorCreateInfo