vulkan command pools
This commit is contained in:
11
src/core/command/command_pool/gryphn_command_pool.c
Normal file
11
src/core/command/command_pool/gryphn_command_pool.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "gryphn_command_pool.h"
|
||||
#include "core/gryphn_platform_functions.h"
|
||||
|
||||
gnReturnCode gnCreateCommandPool(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info) {
|
||||
commandPool->device = device;
|
||||
return device->deviceFunctions->_gnCreateCommandPool(commandPool, device, info);
|
||||
}
|
||||
|
||||
void gnDestroyCommandPool(struct gnCommandPool_t* commandPool) {
|
||||
commandPool->device->deviceFunctions->_gnDestroyCommandPool(commandPool);
|
||||
}
|
15
src/core/command/command_pool/gryphn_command_pool.h
Normal file
15
src/core/command/command_pool/gryphn_command_pool.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "stdint.h"
|
||||
#include <core/output_device/gryphn_output_device.h>
|
||||
|
||||
typedef struct gnCommandPoolInfo_t {
|
||||
uint32_t queueIndex;
|
||||
} gnCommandPoolInfo;
|
||||
|
||||
typedef struct gnCommandPool_t {
|
||||
struct gnPlatformCommandPool_t* commandPool;
|
||||
struct gnOutputDevice_t* device;
|
||||
} gnCommandPool;
|
||||
|
||||
gnReturnCode gnCreateCommandPool(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info);
|
||||
void gnDestroyCommandPool(struct gnCommandPool_t* commandPool);
|
@@ -11,6 +11,7 @@
|
||||
#include "renderpass/gryphn_render_pass_descriptor.h"
|
||||
#include "pipelines/graphics_pipeline/gryphn_graphics_pipeline.h"
|
||||
#include "framebuffer/gryphn_framebuffer.h"
|
||||
#include "command/command_pool/gryphn_command_pool.h"
|
||||
|
||||
typedef struct gnFunctions_t {
|
||||
gnReturnCode (*_gnCreateInstance)(gnInstance* instance, struct gnInstanceInfo_t info);
|
||||
@@ -66,4 +67,7 @@ typedef struct gnDeviceFunctions_t {
|
||||
|
||||
gnReturnCode (*_gnCreateFramebuffer)(struct gnFramebuffer_t* framebuffer, struct gnOutputDevice_t* device, struct gnFramebufferInfo_t framebufferInfo);
|
||||
void (*_gnDestroyFramebuffer)(struct gnFramebuffer_t* framebuffer);
|
||||
|
||||
gnReturnCode (*_gnCreateCommandPool)(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info);
|
||||
void (*_gnDestroyCommandPool)(struct gnCommandPool_t* commandPool);
|
||||
} gnDeviceFunctions;
|
||||
|
@@ -79,4 +79,6 @@ void gnLoadDeviceFunctions(struct gnDynamicLibrary_t* lib, struct gnDeviceFuncti
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyGraphicsPipeline, "gnDestroyGraphicsPipelineFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateFramebuffer, "gnCreateFramebufferFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyFramebuffer, "gnDestroyFramebufferFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnCreateCommandPool, "gnCreateCommandPoolFn");
|
||||
gnLoadDLLFunction(lib, functions->_gnDestroyCommandPool, "gnDestroyCommandPoolFn");
|
||||
}
|
||||
|
Reference in New Issue
Block a user