VulkanMemoryAllocator 0.3.5 → 0.3.6
raw patch · 4 files changed
+13/−8 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- VulkanMemoryAllocator: getBudget :: forall io. MonadIO io => Allocator -> io Budget
+ VulkanMemoryAllocator: getBudget :: forall io. MonadIO io => Allocator -> io ("budget" ::: Vector Budget)
Files
- VulkanMemoryAllocator.cabal +2/−2
- VulkanMemoryAllocator/src/vk_mem_alloc.h +1/−1
- changelog.md +4/−0
- src/VulkanMemoryAllocator.hs +6/−5
VulkanMemoryAllocator.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 2184551936325bcb56130070bd99451c626f78c1a9a0022c7339c408a0ec969d+-- hash: 7863bfd3625ac035108c0bf6883c2d349a9c1481120700fe091175b0c42687f2 name: VulkanMemoryAllocator-version: 0.3.5+version: 0.3.6 synopsis: Bindings to the VulkanMemoryAllocator library category: Graphics homepage: https://github.com/expipiplus1/vulkan#readme
VulkanMemoryAllocator/src/vk_mem_alloc.h view
@@ -2644,7 +2644,7 @@ Pointer to mapped memory will be returned through VmaAllocationInfo::pMappedData. - Is it valid to use this flag for allocation made from memory type that is not + It is valid to use this flag for allocation made from memory type that is not `HOST_VISIBLE`. This flag is then ignored and memory is not mapped. This is useful if you need an allocation that is efficient to use on GPU (`DEVICE_LOCAL`) and still want to map it directly if possible on platforms that
changelog.md view
@@ -2,6 +2,10 @@ ## WIP +## [0.3.6] - 2020-08-05+ - Fix call to getBudget+ - Now works on devices with more than one memory heap!+ ## [0.3.5] - 2020-07-14 - Bump VMA, no interface changes
src/VulkanMemoryAllocator.hs view
@@ -482,11 +482,12 @@ . (MonadIO io) => -- No documentation found for Nested "vmaGetBudget" "allocator" Allocator- -> io (Budget)+ -> io (("budget" ::: Vector Budget)) getBudget allocator = liftIO . evalContT $ do- pPBudget <- ContT (withZeroCStruct @Budget)- lift $ (ffiVmaGetBudget) (allocator) (pPBudget)- pBudget <- lift $ peekCStruct @Budget pPBudget+ pPBudget <- ContT $ bracket (callocBytes @Budget ((MAX_MEMORY_HEAPS) * 32)) free+ _ <- traverse (\i -> ContT $ pokeZeroCStruct (pPBudget `advancePtrBytes` (i * 32) :: Ptr Budget) . ($ ())) [0..(MAX_MEMORY_HEAPS) - 1]+ lift $ (ffiVmaGetBudget) (allocator) ((pPBudget))+ pBudget <- lift $ generateM (MAX_MEMORY_HEAPS) (\i -> peekCStruct @Budget (((pPBudget) `advancePtrBytes` (32 * (i)) :: Ptr Budget))) pure $ (pBudget) @@ -3606,7 +3607,7 @@ -- Pointer to mapped memory will be returned through -- /VmaAllocationInfo::pMappedData/. ----- Is it valid to use this flag for allocation made from memory type that+-- It is valid to use this flag for allocation made from memory type that -- is not @HOST_VISIBLE@. This flag is then ignored and memory is not -- mapped. This is useful if you need an allocation that is efficient to -- use on GPU (@DEVICE_LOCAL@) and still want to map it directly if