kinda forgot

This commit is contained in:
Greg Wells
2025-05-30 12:04:00 -04:00
parent 27b9405eea
commit 64da9c4ec4
8 changed files with 31 additions and 1 deletions

View File

@@ -9,6 +9,10 @@ gnReturnCode gnCommandPoolAllocateCommandBuffers(struct gnCommandBuffer_t* buffe
return commandPool->commandFunctions->_gnCommandPoolAllocateCommandBuffers(buffers, count, commandPool);
}
void gnResetCommandBuffer(struct gnCommandBuffer_t* commandBuffer) {
commandBuffer->commandPool->commandFunctions->_gnResetCommandBuffer(commandBuffer);
}
gnReturnCode gnBeginCommandBuffer(struct gnCommandBuffer_t* commandBuffer) {
return commandBuffer->commandPool->commandFunctions->_gnBeginCommandBuffer(commandBuffer);
}

View File

@@ -8,5 +8,6 @@ typedef struct gnCommandBuffer_t {
gnReturnCode gnCommandPoolAllocateCommandBuffers(struct gnCommandBuffer_t* buffers, uint32_t count, struct gnCommandPool_t* commandPool);
void gnResetCommandBuffer(struct gnCommandBuffer_t* commandBuffer);
gnReturnCode gnBeginCommandBuffer(struct gnCommandBuffer_t* commandBuffer);
gnReturnCode gnEndCommandBuffer(struct gnCommandBuffer_t* commandBuffer);

View File

@@ -58,6 +58,7 @@ typedef struct gnFunctions_t {
#include "core/presentation_queue/gryphn_presentation_queue.h"
typedef struct gnDeviceFunctions_t {
gnReturnCode (*_gnCreatePresentationQueue)(gnPresentationQueue* presentationQueue, const gnOutputDevice* device, struct gnPresentationQueueInfo_t presentationInfo);
void (*_gnPresentationQueueGetImage)(gnPresentationQueue* presentationQueue, uint64_t timeout, struct gnSemaphore_t* semaphore, uint32_t* imageIndex);
void (*_gnDestroyPresentationQueue)(gnPresentationQueue *presentationQueue);
gnReturnCode (*_gnCreateShaderModule)(struct gnShaderModule_t* module, struct gnOutputDevice_t* device, struct gnShaderModuleInfo_t shaderModuleInfo);
@@ -88,6 +89,7 @@ typedef struct gnDeviceFunctions_t {
typedef struct gnCommandFunctions_t {
gnReturnCode (*_gnCommandPoolAllocateCommandBuffers)(struct gnCommandBuffer_t* commandBuffers, uint32_t count, struct gnCommandPool_t* pool);
gnReturnCode (*_gnBeginCommandBuffer)(struct gnCommandBuffer_t* commandBuffer);
void (*_gnResetCommandBuffer)(struct gnCommandBuffer_t* commandBuffer);
gnReturnCode (*_gnEndCommandBuffer)(struct gnCommandBuffer_t* commandBuffer);
void (*_gnCommandBeginRenderPass)(struct gnCommandBuffer_t* buffer, struct gnRenderPassInfo_t passInfo);

View File

@@ -70,6 +70,7 @@ void gnLoadFunctions(struct gnDynamicLibrary_t* lib, struct gnFunctions_t* funct
void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFunctions_t* functions) {
gnLoadDLLFunction(lib, functions->_gnCreatePresentationQueue, "gnCreatePresentationQueueFn");
gnLoadDLLFunction(lib, functions->_gnPresentationQueueGetImage, "gnPresentationQueueGetImageFn");
gnLoadDLLFunction(lib, functions->_gnDestroyPresentationQueue, "gnDestroyPresentationQueueFn");
gnLoadDLLFunction(lib, functions->_gnCreateShaderModule, "gnCreateShaderModuleFn");
gnLoadDLLFunction(lib, functions->_gnDestroyShaderModule, "gnDestroyShaderModuleFn");
@@ -93,9 +94,12 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
void gnLoadCommandFunctions(struct gnDynamicLibrary_t* lib, struct gnCommandFunctions_t* functions) {
gnLoadDLLFunction(lib, functions->_gnCommandPoolAllocateCommandBuffers, "gnCommandPoolAllocateCommandBuffersFn");
gnLoadDLLFunction(lib, functions->_gnBeginCommandBuffer, "gnBeginCommandBufferFn");
gnLoadDLLFunction(lib, functions->_gnResetCommandBuffer, "gnResetCommandBufferFn");
gnLoadDLLFunction(lib, functions->_gnEndCommandBuffer, "gnEndCommandBufferFn");
gnLoadDLLFunction(lib, functions->_gnCommandBeginRenderPass, "gnCommandBeginRenderPassFn");
gnLoadDLLFunction(lib, functions->_gnCommandEndRenderPass, "gnCommandEndRenderPassFn");
gnLoadDLLFunction(lib, functions->_gnCommandBindGraphicsPipeline, "gnCommandBindGraphicsPipelineFn");
gnLoadDLLFunction(lib, functions->_gnCommandSetViewport, "gnCommandSetViewportFn");
gnLoadDLLFunction(lib, functions->_gnCommandSetScissor, "gnCommandSetScissorFn");
gnLoadDLLFunction(lib, functions->_gnCommandDraw, "gnCommandDraw");
gnLoadDLLFunction(lib, functions->_gnCommandDraw, "gnCommandDrawFn");
}

View File

@@ -6,6 +6,10 @@ gnReturnCode gnCreatePresentationQueue(gnPresentationQueue* presentationQueue, s
return device->deviceFunctions->_gnCreatePresentationQueue(presentationQueue, device, presentationInfo);
}
void gnPresentationQueueGetImage(gnPresentationQueue* presentationQueue, uint64_t timeout, struct gnSemaphore_t* semaphore, uint32_t* imageIndex) {
presentationQueue->outputDevice->deviceFunctions->_gnPresentationQueueGetImage(presentationQueue, timeout, semaphore, imageIndex);
}
void gnDestroyPresentationQueue(gnPresentationQueue *presentationQueue) {
presentationQueue->outputDevice->deviceFunctions->_gnDestroyPresentationQueue(presentationQueue);
}

View File

@@ -3,6 +3,7 @@
#include <core/output_device/gryphn_output_device.h>
#include <core/window_surface/gryphn_surface.h>
#include <utils/types/gryphn_image_format.h>
#include <core/sync/semaphore/gryphn_semaphore.h>
typedef struct gnPresentationQueueInfo_t {
uint32_t minImageCount;
@@ -25,4 +26,5 @@ typedef struct gnPresentationQueue_t {
} gnPresentationQueue;
gnReturnCode gnCreatePresentationQueue(gnPresentationQueue* presentationQueue, struct gnOutputDevice_t* device, struct gnPresentationQueueInfo_t presentationInfo);
void gnPresentationQueueGetImage(gnPresentationQueue* presentationQueue, uint64_t timeout, struct gnSemaphore_t* semaphore, uint32_t* imageIndex);
void gnDestroyPresentationQueue(gnPresentationQueue* presentationQueue);