move present over to sync extension

This commit is contained in:
Gregory Wells
2025-07-09 20:35:16 -04:00
parent f44b73665b
commit 9ae7689ab8
11 changed files with 64 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
#include "gryphn_sync_present.h"
#include "core/src/output_device/gryphn_output_device.h"
#include "core/src/instance/gryphn_instance.h"
gnReturnCode gnPresentSync(gnOutputDeviceHandle device, gnPresentSyncInfo info) {
return device->instance->callingLayer->syncFunctions._gnPresentSync(device, info);
}

View File

@@ -0,0 +1,15 @@
#pragma once
#include "stdint.h"
#include "utils/gryphn_error_code.h"
#include "gryphn_handles.h"
typedef struct gnPresentSyncInfo {
uint32_t waitCount;
gnSemaphoreHandle* waitSemaphores;
uint32_t presentationQueueCount;
gnPresentationQueueHandle* presentationQueues;
uint32_t* imageIndices;
uint32_t queueIndex;
} gnPresentSyncInfo;
gnReturnCode gnPresentSync(gnOutputDeviceHandle device, gnPresentSyncInfo info);

View File

@@ -4,6 +4,7 @@
#include "core/src/gryphn_handles.h"
typedef struct gnSubmitSyncInfo gnSubmitSyncInfo;
typedef struct gnPresentSyncInfo gnPresentSyncInfo;
typedef struct gnSyncExtFunctions {
gnReturnCode (*_gnPresentationQueueGetImageAsync)(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
@@ -17,4 +18,5 @@ typedef struct gnSyncExtFunctions {
void (*_gnDestroyFence)(gnFenceHandle fence);
gnReturnCode (*_gnSubmitSync)(gnOutputDevice device, gnSubmitSyncInfo info);
gnReturnCode (*_gnPresentSync)(gnOutputDeviceHandle device, gnPresentSyncInfo info);
} gnSyncExtFunctions;