start the process of making sync objects an extension

This commit is contained in:
Gregory Wells
2025-07-09 19:02:40 -04:00
parent 4b8f854b1f
commit a393d7b5b7
26 changed files with 66 additions and 37 deletions

View File

@@ -16,6 +16,8 @@ target_include_directories(GryphnVulkanImpl PUBLIC
${Vulkan_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/src/
${CMAKE_CURRENT_SOURCE_DIR}/../../core/src/
${CMAKE_CURRENT_SOURCE_DIR}/../../core/
${CMAKE_CURRENT_SOURCE_DIR}/../../extensions/
${CMAKE_CURRENT_SOURCE_DIR}/../../utils/
${CMAKE_CURRENT_SOURCE_DIR}/../../platform/
${CMAKE_CURRENT_SOURCE_DIR}/../../

View File

@@ -18,7 +18,7 @@
gnDeviceFunctions loadVulkanDeviceFunctions() {
return (gnDeviceFunctions){
._gnCreatePresentationQueue = createPresentationQueue,
._gnPresentationQueueGetImage = getPresentQueueImage,
._gnPresentationQueueGetImageAsync = getPresentQueueImageAsync,
._gnDestroyPresentationQueue = destroyPresentationQueue,
._gnCreateShaderModule = createShaderModule,

View File

@@ -81,7 +81,7 @@ gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue
return GN_SUCCESS;
}
gnReturnCode getPresentQueueImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex) {
gnReturnCode getPresentQueueImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex) {
VkResult result = vkAcquireNextImageKHR(
presentationQueue->outputDevice->outputDevice->device,
presentationQueue->presentationQueue->swapChain,

View File

@@ -10,5 +10,5 @@ typedef struct gnPlatformPresentationQueue_t {
} gnPlatformPresentationQueue;
gnReturnCode createPresentationQueue(gnPresentationQueueHandle presentationQueue, const gnDevice device, gnPresentationQueueInfo presentationInfo);
gnReturnCode getPresentQueueImage(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex);
gnReturnCode getPresentQueueImageAsync(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphore semaphore, uint32_t* imageIndex);
void destroyPresentationQueue(gnPresentationQueueHandle queue);

View File

@@ -1,6 +1,6 @@
#pragma once
#include <vulkan/vulkan.h>
#include "sync/fence/gryphn_fence.h"
#include "synchronization/fence/gryphn_fence.h"
typedef struct gnPlatformFence_t {
VkFence fence;

View File

@@ -1,6 +1,6 @@
#pragma once
#include <vulkan/vulkan.h>
#include "sync/semaphore/gryphn_semaphore.h"
#include "synchronization/semaphore/gryphn_semaphore.h"
typedef struct gnPlatformSemaphore_t {
VkSemaphore semaphore;