Write data from buffer.
Maped memory inside.
Maped memory inside.
175 {
177
178#if VMA_ALLOCATOR
179
183 if (size == VK_WHOLE_SIZE)
184 {
186 }
187 else
188 {
190 }
191
192#else
193
194 if (!m_LocalMemory) {
Map(); }
195
199 if (size == VK_WHOLE_SIZE)
200 {
202 }
203 else {
204 char* memOffset = static_cast<char*>(m_LocalMemory);
205 memOffset += offset;
206 memcpy(data, memOffset, size);
207 }
208
209#endif
210
211 }
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
VmaAllocation m_Alloc
VMA allocation.
VkDeviceSize m_DeviceSize
The buffer size.
void Map(VkDeviceSize size=VK_WHOLE_SIZE, VkDeviceSize offset=0)
Map buffer video memory to a local memory.
VulkanState & m_VulkanState
The global VulkanState Referenced from VulkanRenderBackend.
VmaAllocator m_VmaAllocator