Skip to content

Commit 29b87e4

Browse files
committed
fixed copy_from_buffer
1 parent 5efa325 commit 29b87e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/vulkan/vk_runtime_buffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@ static bool vkr_copy_from_buffer_fallback(VkrBuffer* src, size_t buffer_offset,
284284

285285
void* mapped;
286286
CHECK_VK(vkMapMemory(device->device, dst_buf->memory, dst_buf->offset, dst_buf->size, 0, &mapped), goto err_post_buffer_create);
287-
memcpy(mapped, src, size);
288287

289288
if (!wait_completion(submit_buffer_copy(device, src->buffer, src->offset + buffer_offset, dst_buf->buffer, dst_buf->offset, size)))
290289
goto err_post_buffer_create;
291290

291+
memcpy(dst, mapped, size);
292292
vkUnmapMemory(device->device, dst_buf->memory);
293293
vkr_destroy_buffer(dst_buf);
294294
return true;

0 commit comments

Comments
 (0)