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

@@ -23,6 +23,11 @@ gnReturnCode gnCommandPoolAllocateCommandBuffersFn(struct gnCommandBuffer_t* com
return GN_SUCCESS;
}
void gnResetCommandBufferFn(struct gnCommandBuffer_t* commandBuffer) {
vkResetCommandBuffer(commandBuffer->commandBuffer->buffer, 0);
}
gnReturnCode gnBeginCommandBufferFn(struct gnCommandBuffer_t* commandBuffer) {
VkCommandBufferBeginInfo beginInfo = {
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO

View File

@@ -4,6 +4,7 @@
#include "vulkan_surface/vulkan_surface.h"
#include "core/debugger/gryphn_debugger.h"
#include "textures/vulkan_texture.h"
#include "sync/semaphore/vulkan_semaphore.h"
gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueue* presentationQueue, const gnOutputDevice* device, struct gnPresentationQueueInfo_t presentationInfo) {
presentationQueue->presentationQueue = malloc(sizeof(struct gnPlatformPresentationQueue_t));
@@ -109,6 +110,13 @@ gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueue* presentationQueue,
return GN_SUCCESS;
}
void gnPresentationQueueGetImageFn(gnPresentationQueue* presentationQueue, uint64_t timeout, struct gnSemaphore_t* semaphore, uint32_t* imageIndex) {
vkAcquireNextImageKHR(
presentationQueue->outputDevice->outputDevice->device,
presentationQueue->presentationQueue->swapChain,
timeout, semaphore->semaphore->semaphore, VK_NULL_HANDLE, imageIndex);
}
void gnDestroyPresentationQueueFn(gnPresentationQueue* queue) {
for (int i = 0; i < queue->imageCount; i++)
vkDestroyImageView(queue->outputDevice->outputDevice->device, queue->presentationQueue->swapChainImageViews[i], NULL);