fix multiple copy sync hazard
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

cosmonaut 2024-01-12 16:02:21 -08:00
parent ae98ae2345
commit 53c439ef04
1 changed files with 8 additions and 0 deletions

View File

@ -7869,6 +7869,14 @@ static void VULKAN_SetBufferData(
vulkanBuffer
);
// this janky call will wait for transfer writes to finish!
VULKAN_INTERNAL_BufferMemoryBarrier(
renderer,
vulkanCommandBuffer->commandBuffer,
RESOURCE_ACCESS_TRANSFER_WRITE,
vulkanBuffer
);
bufferCopy.srcOffset = transferBuffer->offset;
bufferCopy.dstOffset = offsetInBytes;
bufferCopy.size = (VkDeviceSize) dataLength;