insert missing memory barrier after buffer copy

submit_rewrite
cosmonaut 2022-01-17 19:57:45 -08:00
parent 49d7b1fabc
commit e59e3e6b02
1 changed files with 8 additions and 0 deletions

View File

@ -6771,6 +6771,7 @@ static void VULKAN_SetBufferData(
VulkanTransferBuffer* transferBuffer; VulkanTransferBuffer* transferBuffer;
uint8_t* transferBufferPointer; uint8_t* transferBufferPointer;
VkBufferCopy bufferCopy; VkBufferCopy bufferCopy;
VulkanResourceAccessType accessType = vulkanBuffer->resourceAccessType;
if (vulkanCommandBuffer->renderPassInProgress) if (vulkanCommandBuffer->renderPassInProgress)
{ {
@ -6823,6 +6824,13 @@ static void VULKAN_SetBufferData(
&bufferCopy &bufferCopy
); );
VULKAN_INTERNAL_BufferMemoryBarrier(
renderer,
vulkanCommandBuffer->commandBuffer,
accessType,
vulkanBuffer
);
transferBuffer->offset += dataLength; transferBuffer->offset += dataLength;
} }