more fence work
continuous-integration/drone/push Build is passing Details

pull/45/head
cosmonaut 2023-09-18 22:23:36 -07:00
parent 6e3607999a
commit 4b50e9cec7
3 changed files with 60 additions and 8 deletions

View File

@ -892,14 +892,23 @@ void Refresh_SetSwapchainPresentMode(
void Refresh_Submit(
Refresh_Device *device,
uint32_t commandBufferCount,
Refresh_CommandBuffer **pCommandBuffers
Refresh_CommandBuffer *commandBuffer
) {
NULL_RETURN(device);
device->Submit(
device->driverData,
commandBufferCount,
pCommandBuffers
commandBuffer
);
}
Refresh_Fence* Refresh_SubmitAndAcquireFence(
Refresh_Device *device,
Refresh_CommandBuffer *commandBuffer
) {
NULL_RETURN_NULL(device);
return device->SubmitAndAcquireFence(
device->driverData,
commandBuffer
);
}
@ -912,4 +921,44 @@ void Refresh_Wait(
);
}
void Refresh_WaitForFences(
Refresh_Device *device,
uint8_t waitAll,
uint32_t fenceCount,
Refresh_Fence **pFences
) {
NULL_RETURN(device);
device->WaitForFences(
device->driverData,
waitAll,
fenceCount,
pFences
);
}
int Refresh_QueryFence(
Refresh_Device *device,
Refresh_Fence *fence
) {
if (device == NULL) {
return 0;
}
return device->QueryFence(
device->driverData,
fence
);
}
void Refresh_ReleaseFence(
Refresh_Device *device,
Refresh_Fence *fence
) {
NULL_RETURN(device);
device->ReleaseFence(
device->driverData,
fence
);
}
/* vim: set noexpandtab shiftwidth=8 tabstop=8: */

View File

@ -502,7 +502,7 @@ struct Refresh_Device
Refresh_CommandBuffer *commandBuffer
);
void (*SubmitAndAcquireFence)(
Refresh_Fence* (*SubmitAndAcquireFence)(
Refresh_Renderer *driverData,
Refresh_CommandBuffer *commandBuffer
);

View File

@ -1839,7 +1839,7 @@ static uint8_t VULKAN_INTERNAL_DefragmentMemory(VulkanRenderer *renderer);
static void VULKAN_INTERNAL_BeginCommandBuffer(VulkanRenderer *renderer, VulkanCommandBuffer *commandBuffer);
static void VULKAN_UnclaimWindow(Refresh_Renderer *driverData, void *windowHandle);
static void VULKAN_Wait(Refresh_Renderer *driverData);
static void VULKAN_Submit(Refresh_Renderer *driverData, uint32_t commandBufferCount, Refresh_CommandBuffer **pCommandBuffers);
static void VULKAN_Submit(Refresh_Renderer *driverData, Refresh_CommandBuffer *commandBuffer);
static void VULKAN_INTERNAL_DestroyRenderTarget(VulkanRenderer *renderer, VulkanRenderTarget *renderTarget);
/* Error Handling */
@ -10761,7 +10761,7 @@ static void VULKAN_WaitForFences(
result = renderer->vkWaitForFences(
renderer->logicalDevice,
fenceCount,
pFences,
(VkFence*) pFences,
waitAll,
UINT64_MAX
);
@ -10779,7 +10779,10 @@ static int VULKAN_QueryFence(
VulkanRenderer* renderer = (VulkanRenderer*) driverData;
VkResult result;
result = renderer->vkGetFenceStatus(driverData, (VkFence) fence);
result = renderer->vkGetFenceStatus(
renderer->logicalDevice,
(VkFence) fence
);
if (result == VK_SUCCESS)
{