get the metal backend to compile (does not load)

This commit is contained in:
Greg Wells
2025-06-25 10:46:07 -04:00
parent 4306646c6e
commit 2c9e2260f4
39 changed files with 235 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
#pragma once
#include "core/sync/fence/gryphn_fence.h"
#include "sync/fence/gryphn_fence.h"
#import <Metal/Metal.h>
#import <Metal/MTLEvent.h>

View File

@@ -1,5 +1,5 @@
#include "metal_fence.h"
#include "core/devices/metal_output_devices.h"
#include "devices/metal_output_devices.h"
gnReturnCode gnCreateFenceFn(struct gnFence_t* fence, struct gnOutputDevice_t* device) {
// fence->fence = malloc(sizeof(gnPlatformFence));

View File

@@ -1,5 +1,5 @@
#pragma once
#include "core/sync/semaphore/gryphn_semaphore.h"
#include "sync/semaphore/gryphn_semaphore.h"
#import <Metal/MTLEvent.h>
typedef struct gnPlatformSemaphore_t {

View File

@@ -1,13 +1,13 @@
#include "metal_semaphore.h"
#include "core/devices/metal_output_devices.h"
#include "devices/metal_output_devices.h"
gnReturnCode gnCreateSemaphoreFn(struct gnSemaphore_t* semaphore, struct gnOutputDevice_t* device) {
gnReturnCode gnCreateSemaphoreFn(gnSemaphore semaphore, gnOutputDevice device) {
semaphore->semaphore = malloc(sizeof(gnPlatformSemaphore));
semaphore->semaphore->event = [device->outputDevice->device newEvent];
return GN_SUCCESS;
}
void gnDestroySemaphoreFn(struct gnSemaphore_t* semaphore) {
void gnDestroySemaphoreFn(gnSemaphore semaphore) {
[semaphore->semaphore->event release];
free(semaphore->semaphore);
}