rename to projects (DOES NOT COMPILE)
This commit is contained in:
20
projects/core/src/command/command_pool/gryphn_command_pool.c
Normal file
20
projects/core/src/command/command_pool/gryphn_command_pool.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "gryphn_command_pool.h"
|
||||
#include "gryphn_platform_functions.h"
|
||||
#include "instance/init/gryphn_init.h"
|
||||
|
||||
gnReturnCode gnCreateCommandPool(gnCommandPoolHandle* commandPool, gnOutputDeviceHandle device, struct gnCommandPoolInfo_t info) {
|
||||
*commandPool = malloc(sizeof(struct gnCommandPool_t));
|
||||
if (!device->instance->loadCommandFunctions) {
|
||||
device->instance->commandFunctions = malloc(sizeof(struct gnCommandFunctions_t));
|
||||
gnLoadCommandFunctions(device->instance->dynamicLib, device->instance->commandFunctions);
|
||||
device->instance->loadCommandFunctions = gnTrue;
|
||||
}
|
||||
(*commandPool)->commandFunctions = device->instance->commandFunctions;
|
||||
|
||||
(*commandPool)->device = device;
|
||||
return device->deviceFunctions->_gnCreateCommandPool((*commandPool), device, info);
|
||||
}
|
||||
|
||||
void gnDestroyCommandPool(gnCommandPoolHandle commandPool) {
|
||||
commandPool->device->deviceFunctions->_gnDestroyCommandPool(commandPool);
|
||||
}
|
19
projects/core/src/command/command_pool/gryphn_command_pool.h
Normal file
19
projects/core/src/command/command_pool/gryphn_command_pool.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "stdint.h"
|
||||
#include <utils/gryphn_error_code.h>
|
||||
#include "gryphn_handles.h"
|
||||
|
||||
typedef struct gnCommandPoolInfo_t {
|
||||
uint32_t queueIndex;
|
||||
} gnCommandPoolInfo;
|
||||
|
||||
#ifdef GN_REVEAL_IMPL
|
||||
struct gnCommandPool_t {
|
||||
struct gnPlatformCommandPool_t* commandPool;
|
||||
struct gnCommandFunctions_t* commandFunctions;
|
||||
struct gnOutputDevice_t* device;
|
||||
};
|
||||
#endif
|
||||
|
||||
gnReturnCode gnCreateCommandPool(gnCommandPoolHandle* commandPool, gnOutputDeviceHandle device, struct gnCommandPoolInfo_t info);
|
||||
void gnDestroyCommandPool(gnCommandPoolHandle commandPool);
|
Reference in New Issue
Block a user