get all the commands to work

This commit is contained in:
Greg Wells
2025-06-29 14:40:09 -04:00
parent 67e5e6e36a
commit 8211876837
37 changed files with 295 additions and 154 deletions

View File

@@ -5,3 +5,6 @@
typedef struct gnPlatformCommandPool_t {
id<MTLCommandQueue> commandQueue;
} gnPlatformCommandPool;
gnReturnCode createMetalCommandPool(gnCommandPool commandPool, gnDevice device, gnCommandPoolInfo info);
void destroyMetalCommandPool(gnCommandPool commandPool);

View File

@@ -1,14 +1,14 @@
#include "metal_command_pool.h"
#include "devices/metal_output_devices.h"
gnReturnCode gnCreateCommandPoolFn(struct gnCommandPool_t* commandPool, struct gnOutputDevice_t* device, gnCommandPoolInfo info) {
gnReturnCode createMetalCommandPool(gnCommandPool commandPool, gnDevice device, gnCommandPoolInfo info) {
commandPool->commandPool = malloc(sizeof(struct gnPlatformCommandPool_t));
commandPool->commandPool->commandQueue = [device->outputDevice->device newCommandQueue];
return GN_SUCCESS;
}
void gnDestroyCommandPoolFn(struct gnCommandPool_t* commandPool) {
void destroyMetalCommandPool(gnCommandPool commandPool) {
[commandPool->commandPool->commandQueue release];
free(commandPool->commandPool);
}