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

pull/49/head
cosmonaut 2024-01-12 16:02:21 -08:00
parent 39b97dec27
commit db1455ceb0
1 changed files with 8 additions and 0 deletions

View File

@ -7882,6 +7882,14 @@ static void VULKAN_SetBufferData(
vulkanBuffer 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.srcOffset = transferBuffer->offset;
bufferCopy.dstOffset = offsetInBytes; bufferCopy.dstOffset = offsetInBytes;
bufferCopy.size = (VkDeviceSize) dataLength; bufferCopy.size = (VkDeviceSize) dataLength;