From 0c095fa56d56936790c21ff50d4c597d6807a9ec Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 16 Feb 2024 18:56:25 -0800 Subject: [PATCH] write pDataPtr on CreateCpuBuffer --- src/Refresh_Driver_Vulkan.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index abf0f88..e0687bb 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -6818,7 +6818,8 @@ static Refresh_GpuBuffer* VULKAN_CreateGpuBuffer( static Refresh_CpuBuffer* VULKAN_CreateCpuBuffer( Refresh_Renderer *driverData, - uint32_t sizeInBytes + uint32_t sizeInBytes, + void **pDataPtr ) { VulkanRenderer *renderer = (VulkanRenderer*) driverData; VkBufferUsageFlags vulkanUsageFlags = @@ -6835,6 +6836,8 @@ static Refresh_CpuBuffer* VULKAN_CreateCpuBuffer( 1 ); + *pDataPtr = vulkanBuffer->usedRegion->allocation->mapPointer; + return (Refresh_CpuBuffer*) vulkanBuffer; }