# HG changeset patch # User Sam # Date 1682764569 -25200 # Node ID 2a6133d06229cd540a4ee0ea4238eeed4227cf99 # Parent a15094bc47b41ced22739c0feeb13180f4b58654 add: debug output diff -r a15094bc47b4 -r 2a6133d06229 src/semicongine/vulkan/buffer.nim --- a/src/semicongine/vulkan/buffer.nim Sat Apr 29 17:30:15 2023 +0700 +++ b/src/semicongine/vulkan/buffer.nim Sat Apr 29 17:36:09 2023 +0700 @@ -92,6 +92,7 @@ pBuffer=addr result.vk ) result.allocateMemory(requireMappable=requireMappable, preferVRAM=preferVRAM, preferAutoFlush=preferAutoFlush) + echo "New Buffer ", result proc copy*(src, dst: Buffer) = @@ -119,6 +120,7 @@ ) copyRegion = VkBufferCopy(size: VkDeviceSize(src.size)) checkVkResult commandBuffer.vkBeginCommandBuffer(addr(beginInfo)) + echo "B ", dst commandBuffer.vkCmdCopyBuffer(src.vk, dst.vk, 1, addr(copyRegion)) checkVkResult commandBuffer.vkEndCommandBuffer() @@ -149,6 +151,7 @@ else: # use staging buffer, slower but required if memory is not host visible var stagingBuffer = dst.device.createBuffer(size, [VK_BUFFER_USAGE_TRANSFER_SRC_BIT], requireMappable=true, preferVRAM=false, preferAutoFlush=true) stagingBuffer.setData(src, size, 0) + echo "B ", dst stagingBuffer.copy(dst) stagingBuffer.destroy()