submit command moved to sync extension

This commit is contained in:
Gregory Wells
2025-07-09 20:29:07 -04:00
parent a6c05bfa52
commit f44b73665b
13 changed files with 73 additions and 22 deletions

View File

@@ -0,0 +1,7 @@
#include "gryphn_sync_submit.h"
#include "core/src/output_device/gryphn_output_device.h"
#include "core/src/instance/gryphn_instance.h"
gnReturnCode gnSubmitSync(gnOutputDevice device, gnSubmitSyncInfo info) {
return device->instance->callingLayer->syncFunctions._gnSubmitSync(device, info);
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include "stdint.h"
#include "core/src/renderpass/gryphn_render_pass_descriptor.h"
#include "core/src/gryphn_handles.h"
typedef struct gnSubmitSyncInfo {
uint32_t waitCount;
gnRenderPassStage* waitStages;
gnSemaphoreHandle* waitSemaphores;
uint32_t signalCount;
gnSemaphoreHandle* signalSemaphores;
uint32_t commandBufferCount;
gnCommandBufferHandle* commandBuffers;
uint32_t queueIndex;
gnFenceHandle fence;
} gnSubmitSyncInfo;
gnReturnCode gnSubmitSync(gnOutputDevice device, gnSubmitSyncInfo info);

View File

@@ -3,15 +3,18 @@
#include "utils/gryphn_error_code.h"
#include "core/src/gryphn_handles.h"
typedef struct gnSubmitSyncInfo gnSubmitSyncInfo;
typedef struct gnSyncExtFunctions {
gnReturnCode (*_gnPresentationQueueGetImageAsync)(gnPresentationQueueHandle presentationQueue, uint64_t timeout, gnSemaphoreHandle semaphore, uint32_t* imageIndex);
gnReturnCode (*_gnCreateSemaphore)(gnSemaphoreHandle semaphore, gnOutputDeviceHandle device);
void (*_gnDestroySemaphore)(gnSemaphoreHandle semaphore);
gnReturnCode (*_gnCreateFence)(gnFenceHandle fence, gnOutputDeviceHandle device);
void (*_gnWaitForFence)(gnFenceHandle fence, uint64_t timeout);
void (*_gnResetFence)(gnFenceHandle fence);
void (*_gnDestroyFence)(gnFenceHandle fence);
gnReturnCode (*_gnSubmitSync)(gnOutputDevice device, gnSubmitSyncInfo info);
} gnSyncExtFunctions;