| 1151 | } |
| 1152 | |
| 1153 | void Buffer::AllocateAndBindMemory(const Device& dev, VkMemoryPropertyFlags mem_props, void* alloc_info_pnext) { |
| 1154 | assert(!internal_mem_.initialized()); |
| 1155 | internal_mem_.Init(dev, DeviceMemory::GetResourceAllocInfo(dev, MemoryRequirements(), mem_props, alloc_info_pnext)); |
| 1156 | BindMemory(internal_mem_, 0); |
| 1157 | } |
| 1158 | |
| 1159 | void Buffer::BindMemory(const DeviceMemory& mem, VkDeviceSize mem_offset) { |
| 1160 | const auto result = vk::BindBufferMemory(device(), handle(), mem, mem_offset); |