some housekeeping

This commit is contained in:
Greg Wells
2025-07-12 15:00:19 -04:00
parent 8445c0553b
commit e43b731f39
9 changed files with 12 additions and 17 deletions

View File

@@ -87,12 +87,9 @@ gnReturnCode getVulkanPresentQueueImage(gnPresentationQueueHandle presentationQu
presentationQueue->outputDevice->outputDevice->device,
presentationQueue->presentationQueue->swapChain,
UINT64_MAX, VK_NULL_HANDLE, presentationQueue->outputDevice->outputDevice->barrierFence, imageIndex);
if (result == VK_ERROR_OUT_OF_DATE_KHR) return GN_OUT_OF_DATE_PRESENTATION_QUEUE;
if (result == VK_SUBOPTIMAL_KHR) return GN_SUBOPTIMAL_PRESENTATION_QUEUE;
vkWaitForFences(presentationQueue->outputDevice->outputDevice->device, 1, &presentationQueue->outputDevice->outputDevice->barrierFence, VK_TRUE, UINT64_MAX);
return GN_SUCCESS;
}

View File

@@ -6,6 +6,7 @@ gnReturnCode createFence(gnFence fence, gnDevice device) {
VkFenceCreateInfo fenceInfo = {
.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO
};
if (vkCreateFence(device->outputDevice->device, &fenceInfo, NULL, &fence->fence->fence) != VK_SUCCESS)
return GN_FAILED_TO_CREATE_FENCE;
return GN_SUCCESS;