Add gpuFlushBuffer
This commit is contained in:
1 parent
6c6dd5626c
commit
f308900207
2 files changed
+15
No files matched your search
@@ -1037,6 +1037,13 @@ void gpuDestroyBuffer(GpuBuffer *buffer) {
|
||||
buffer->size = 0;
|
||||
}
|
||||
|
||||
void gpuFlushBuffer(GpuBufferFlushRequest request) {
|
||||
u64 size = request.size > 0 ? request.size : VK_WHOLE_SIZE;
|
||||
VkResult vk_result = vmaFlushAllocation(request.device->allocator, request.buffer.internal->allocation,
|
||||
request.offset, size);
|
||||
assertWithLogger(vk_result == VK_SUCCESS, &logger, "Failed to flush buffer");
|
||||
}
|
||||
|
||||
GpuFence *gpuCreateFence(const WpAllocator *allocator, GpuDevice *device) {
|
||||
GpuFence *fence = wpMemAllocatorAlloc(allocator, sizeof(GpuFence));
|
||||
assertWithLogger(fence != NULL, &logger, "Failed to allocate fence internal");
|
||||
|
||||
Reference in new issue
Block a user