packages feed

keid-core 0.1.5.0 → 0.1.5.1

raw patch · 4 files changed

+33/−6 lines, 4 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Engine.Setup: vmaVulkanFunctions :: Device -> Instance -> VulkanFunctions
- Engine.Frame: initial :: RenderPass rp => Maybe SwapchainResources -> DumpResource (RecycledResources rr) -> Stage rp p rr st -> StageRIO st (Frame rp p rr)
+ Engine.Frame: initial :: Maybe SwapchainResources -> DumpResource (RecycledResources rr) -> Stage rp p rr st -> StageRIO st (Frame rp p rr)

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for keid-core +## 0.1.5.1++- Fixed `VMA.AllocatorCreateInfo` for `vulkan-3.15` and newer.+ ## 0.1.5.0  - Removed `allocateRenderpass_` from `RenderPass` class.
keid-core.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           keid-core-version:        0.1.5.0+version:        0.1.5.1 synopsis:       Core parts of Keid engine. category:       Game Engine author:         IC Rainbow
src/Engine/Frame.hs view
@@ -33,8 +33,7 @@ import Engine.Vulkan.Types (HasVulkan(..), MonadVulkan, RenderPass(..), Queues)  initial-  :: (RenderPass rp)-  => Maybe SwapchainResources+  :: Maybe SwapchainResources   -> DumpResource (RecycledResources rr)   -> Stage rp p rr st   -> StageRIO st (Frame rp p rr)
src/Engine/Setup.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ module Engine.Setup where  import RIO@@ -14,6 +16,11 @@ import Vulkan.Zero (zero) import VulkanMemoryAllocator qualified as VMA +#if MIN_VERSION_vulkan(3,15,0)+import Foreign.Ptr (castFunPtr)+import Vulkan.Dynamic qualified as VkDynamic+#endif+ import Engine.Camera qualified as Camera import Engine.Setup.Device (allocatePhysical, allocateLogical) import Engine.Setup.Window qualified as Window@@ -60,9 +67,10 @@   let     allocatorCI :: VMA.AllocatorCreateInfo     allocatorCI = zero-      { VMA.physicalDevice = Vk.physicalDeviceHandle ghPhysicalDevice-      , VMA.device         = Vk.deviceHandle ghDevice-      , VMA.instance'      = Vk.instanceHandle ghInstance+      { VMA.physicalDevice  = Vk.physicalDeviceHandle ghPhysicalDevice+      , VMA.device          = Vk.deviceHandle ghDevice+      , VMA.instance'       = Vk.instanceHandle ghInstance+      , VMA.vulkanFunctions = Just $ vmaVulkanFunctions ghDevice ghInstance       }   (_vmaKey, ghAllocator) <- VMA.withAllocator allocatorCI Resource.allocate   toIO (logDebug "Releasing VMA") >>= Resource.register@@ -80,6 +88,22 @@   ghStageSwitch <- newStageSwitchVar    pure (GlobalHandles{..}, Nothing)++vmaVulkanFunctions+  :: Vk.Device+  -> Vk.Instance+  -> VMA.VulkanFunctions+#if MIN_VERSION_vulkan(3,15,0)+vmaVulkanFunctions Vk.Device{deviceCmds} Vk.Instance{instanceCmds} =+  zero+    { VMA.vkGetInstanceProcAddr =+        castFunPtr $ VkDynamic.pVkGetInstanceProcAddr instanceCmds+    , VMA.vkGetDeviceProcAddr =+        castFunPtr $ VkDynamic.pVkGetDeviceProcAddr deviceCmds+    }+#else+vmaVulkanFunctions _device _instance = zero+#endif  setupHeadless   :: ( HasLogFunc env