# HG changeset patch # User Sam # Date 1682604973 -25200 # Node ID 321d3de6c78c20f9a4da873f97efd47830a2dd34 # Parent de04cf5c2558cc9243fa3d2b08d51fadb81c46f8 fix: more improvment for memory selection diff -r de04cf5c2558 -r 321d3de6c78c src/semicongine/vulkan/buffer.nim --- a/src/semicongine/vulkan/buffer.nim Thu Apr 27 21:13:09 2023 +0700 +++ b/src/semicongine/vulkan/buffer.nim Thu Apr 27 21:16:13 2023 +0700 @@ -47,7 +47,8 @@ buffer.memoryAllocated = true debug "Allocating memory for buffer: ", buffer.size, " bytes ", flags buffer.memory = buffer.device.allocate(buffer.size, flags) - checkVkResult buffer.device.vk.vkBindBufferMemory(buffer.vk, buffer.memory.vk, VkDeviceSize(0)) + if buffer.memory.canMap: + checkVkResult buffer.device.vk.vkBindBufferMemory(buffer.vk, buffer.memory.vk, VkDeviceSize(0)) # currently no support for extended structure and concurrent/shared use