Mercurial > games > semicongine
changeset 155:321d3de6c78c
fix: more improvment for memory selection
author | Sam <sam@basx.dev> |
---|---|
date | Thu, 27 Apr 2023 21:16:13 +0700 |
parents | de04cf5c2558 |
children | 134647ed5b60 |
files | src/semicongine/vulkan/buffer.nim |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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