metal command pool
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
#import <Metal/Metal.h>
|
||||
#include "core/command/command_pool/gryphn_command_pool.h"
|
||||
|
||||
typedef struct gnPlatformCommandPool_t {
|
||||
id<MTLCommandQueue> commandQueue;
|
||||
} gnPlatformCommandPool;
|
@@ -0,0 +1,13 @@
|
||||
#include "metal_command_pool.h"
|
||||
#include "core/devices/metal_output_devices.h"
|
||||
|
||||
gnReturnCode gnCreateCommandPoolFn(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, struct gnCommandPoolInfo_t info) {
|
||||
commandPool->commandPool = malloc(sizeof(struct gnPlatformCommandPool_t));
|
||||
commandPool->commandPool->commandQueue = [device->outputDevice->device newCommandQueue];
|
||||
return GN_SUCCESS;
|
||||
}
|
||||
|
||||
void gnDestroyCommandPoolFn(struct gnCommandPool_t* commandPool) {
|
||||
[commandPool->commandPool->commandQueue release];
|
||||
free(commandPool->commandPool);
|
||||
}
|
Reference in New Issue
Block a user