Don't upload if size is empty

This commit is contained in:
Benau
2022-07-05 08:54:06 +08:00
parent defd58a465
commit cc6914631a

View File

@@ -207,7 +207,7 @@ void GEVulkanDynamicBuffer::setCurrentData(void* data, size_t size)
initPerFrame(i);
}
m_real_size = size;
if (m_mapped_addr[cur_frame] == NULL)
if (size == 0 || m_mapped_addr[cur_frame] == NULL)
return;
memcpy(m_mapped_addr[cur_frame], data, size);
if (m_type == GVDBT_GPU_RAM)