reuse command buffers flag

This commit is contained in:
Greg Wells
2025-07-02 09:12:33 -04:00
parent 9c154c1eeb
commit a74dd63786
21 changed files with 51 additions and 11 deletions

View File

@@ -30,3 +30,7 @@ gnReturnCode gnBeginCommandBuffer(gnCommandBufferHandle commandBuffer) {
gnReturnCode gnEndCommandBuffer(gnCommandBufferHandle commandBuffer) {
return commandBuffer->commandPool->instance->callingLayer->commandFunctions._gnEndCommandBuffer(commandBuffer);
}
void gnDestroyCommandBuffer(gnCommandBufferHandle commandBuffer) {
commandBuffer->commandPool->instance->callingLayer->commandFunctions._gnDestroyCommandBuffer(commandBuffer);
}

View File

@@ -27,3 +27,4 @@ gnReturnCode gnCommandPoolAllocateCommandBuffersFromList(gnCommandBufferArrayLis
void gnResetCommandBuffer(gnCommandBufferHandle commandBuffer);
gnReturnCode gnBeginCommandBuffer(gnCommandBufferHandle commandBuffer);
gnReturnCode gnEndCommandBuffer(gnCommandBufferHandle commandBuffer);
void gnDestroyCommandBuffer(gnCommandBufferHandle commandBuffer);

View File

@@ -8,6 +8,7 @@ gnReturnCode gnCreateCommandPool(gnCommandPoolHandle* commandPool, gnOutputDevic
(*commandPool)->instance = device->instance;
(*commandPool)->device = device;
(*commandPool)->info = info;
return device->instance->callingLayer->deviceFunctions._gnCreateCommandPool((*commandPool), device, info);
}

View File

@@ -3,8 +3,14 @@
#include <utils/gryphn_error_code.h>
#include "gryphn_handles.h"
typedef enum gnCommandPoolFlags {
GN_NO_FLAGS = 0,
GN_REUSE_COMMAND_BUFFERS = 1
} gnCommandPoolFlags;
typedef struct gnCommandPoolInfo {
uint32_t queueIndex;
gnCommandPoolFlags flags;
} gnCommandPoolInfo;
#ifdef GN_REVEAL_IMPL
@@ -12,6 +18,7 @@ struct gnCommandPool_t {
struct gnPlatformCommandPool_t* commandPool;
gnDevice device;
gnInstance instance;
gnCommandPoolInfo info;
};
#endif