# HG changeset patch # User Sam # Date 1682604973 -25200 # Node ID 83e990b0eb6a46dc7e895c60b0514f8008620c70 # Parent 91e6b2935934d79e98823dd229cdc90964c42433 fix: more improvment for memory selection diff -r 91e6b2935934 -r 83e990b0eb6a 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