present stuff

This commit is contained in:
Greg Wells
2025-05-30 13:28:10 -04:00
parent dd5e93864d
commit 7ebb109c44
6 changed files with 52 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#include "sync/fence/gryphn_fence.h"
#include "sync/semaphore/gryphn_semaphore.h"
#include "core/submit/gryphn_submit.h"
#include "core/present/gryphn_present.h"
typedef struct gnFunctions_t {
gnReturnCode (*_gnCreateInstance)(gnInstance* instance, struct gnInstanceInfo_t info);
@@ -87,6 +88,7 @@ typedef struct gnDeviceFunctions_t {
void (*_gnDestroyFence)(struct gnFence_t* fence);
gnReturnCode (*_gnSubmit)(struct gnOutputDevice_t* device, struct gnSubmitInfo_t submit);
gnReturnCode (*_gnPresent)(struct gnOutputDevice_t* device, struct gnPresentInfo_t info);
} gnDeviceFunctions;
typedef struct gnCommandFunctions_t {

View File

@@ -90,6 +90,7 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
gnLoadDLLFunction(lib, functions->_gnResetFence, "gnResetFenceFn");
gnLoadDLLFunction(lib, functions->_gnDestroyFence, "gnDestroyFenceFn");
gnLoadDLLFunction(lib, functions->_gnSubmit, "gnSubmitFn");
gnLoadDLLFunction(lib, functions->_gnPresent, "gnPresentFn");
}
void gnLoadCommandFunctions(struct gnDynamicLibrary_t* lib, struct gnCommandFunctions_t* functions) {

View File

@@ -0,0 +1,6 @@
#include "core/gryphn_platform_functions.h"
#include "gryphn_present.h"
gnReturnCode gnPresent(struct gnOutputDevice_t* device, struct gnPresentInfo_t info) {
return device->deviceFunctions->_gnPresent(device, info);
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include "core/sync/semaphore/gryphn_semaphore.h"
#include "core/presentation_queue/gryphn_presentation_queue.h"
typedef struct gnPresentInfo_t {
uint32_t waitCount;
struct gnSemaphore_t* waitSemaphores;
uint32_t presentationQueueCount;
struct gnPresentationQueue_t* presentationQueues;
uint32_t* imageIndices;
uint32_t queueIndex;
} gnPresentInfo;
gnReturnCode gnPresent(struct gnOutputDevice_t* device, struct gnPresentInfo_t info);