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

@@ -0,0 +1,22 @@
#include "metal_loader.h"
gnCommandFunctions loadMetalCommandFunctions() {
return (gnCommandFunctions){
._gnCommandPoolAllocateCommandBuffers = NULL,
._gnBeginCommandBuffer = NULL,
._gnResetCommandBuffer = NULL,
._gnEndCommandBuffer = NULL,
._gnCommandBeginRenderPass = NULL,
._gnCommandEndRenderPass = NULL,
._gnCommandBindGraphicsPipeline = NULL,
._gnCommandSetViewport = NULL,
._gnCommandSetScissor = NULL,
._gnCommandBindUniform = NULL,
._gnCommandPushConstant = NULL,
._gnCommandBindBuffer = NULL,
._gnCommandDraw = NULL,
._gnCommandDrawIndexed = NULL,
};
}

View File

@@ -0,0 +1,53 @@
#include "metal_loader.h"
gnDeviceFunctions loadMetalDeviceFunctions() {
return (gnDeviceFunctions){
._gnCreatePresentationQueue = NULL,
._gnPresentationQueueGetImage = NULL,
._gnDestroyPresentationQueue = NULL,
._gnCreateShaderModule = NULL,
._gnDestroyShaderModule = NULL,
._gnCreateRenderPassDescriptor = NULL,
._gnDestroyRenderPassDescriptor = NULL,
._gnCreateGraphicsPipeline = NULL,
._gnDestroyGraphicsPipeline = NULL,
._gnCreateFramebuffer = NULL,
._gnDestroyFramebuffer = NULL,
._gnCreateCommandPool = NULL,
._gnDestroyCommandPool = NULL,
._gnCreateSemaphore = NULL,
._gnDestroySemaphore = NULL,
._gnCreateBuffer = NULL,
._gnBufferData = NULL,
._gnMapBuffer = NULL,
._gnDestroyBuffer = NULL,
._gnCreateUniformPool = NULL,
._gnUniformPoolAllocateUniforms = NULL,
._gnDestroyUniformPool = NULL,
._gnUpdateBufferUniform = NULL,
._gnUpdateImageUniform = NULL,
._gnCreateTexture = NULL,
._gnTextureData = NULL,
._gnDestroyTexture = NULL,
._gnCreateFence = NULL,
._gnWaitForFence = NULL,
._gnResetFence = NULL,
._gnDestroyFence = NULL,
._gnSubmit = NULL,
._gnPresent = NULL,
._gnWaitForDevice = NULL
};
}

View File

@@ -0,0 +1,15 @@
#include "metal_loader.h"
gnInstanceFunctions loadMetalInstanceFunctions() {
return (gnInstanceFunctions){
._gnCreateInstance = NULL,
._gnDestroyInstance = NULL,
._gnGetPhysicalDevices = NULL,
._gnQueueCanPresentToSurface = NULL,
._gnCreateOutputDevice = NULL,
._gnDestroyOutputDevice = NULL,
._gnCreateMacOSWindowSurface = NULL,
._gnDestroyWindowSurface = NULL,
._gnGetSurfaceDetails = NULL
};
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "loader/src/gryphn_instance_functions.h"
#include "loader/src/gryphn_device_functions.h"
#include "loader/src/gryphn_command_functions.h"
gnInstanceFunctions loadMetalInstanceFunctions();
gnDeviceFunctions loadMetalDeviceFunctions();
gnCommandFunctions loadMetalCommandFunctions();