inplement the allocators into instance creation

This commit is contained in:
Gregory Wells
2025-08-09 20:04:57 -04:00
parent af7d75b728
commit 5b37555a34
10 changed files with 54 additions and 24 deletions

View File

@@ -4,24 +4,24 @@
#include "core/src/output_device/gryphn_output_device.h"
#include "core/src/window_surface/gryphn_surface.h"
gnReturnCode checkCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo* info, gryphnInstanceFunctionLayers* next) {
gnReturnCode checkCreateInstance(gnInstanceHandle instance, gnInstanceCreateInfo* info, gryphnInstanceFunctionLayers* next, gnAllocators* alloctors) {
if (next == NULL || next->createInstance == NULL) {
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
.message = gnCreateString("Failed to load gnCreateInstance this indicates a bug within gryphn")
});
return GN_FAILED_TO_LOAD_FUNCTION;
}
return next->createInstance(instance, info, next->next);
return next->createInstance(instance, info, next->next, alloctors);
}
void checkDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayers* next) {
void checkDestroyInstance(gnInstanceHandle instance, gryphnInstanceFunctionLayers* next, gnAllocators* alloctors) {
if (next == NULL || next->destroyInstance == NULL) {
gnDebuggerSetErrorMessage(instance->debugger, (gnMessageData){
.message = gnCreateString("Failed to load gnDestroyInstance this indicates a bug within gryphn")
});
return;
}
next->destroyInstance(instance, next->next);
next->destroyInstance(instance, next->next, alloctors);
}
gnPhysicalDevice* checkGetPhysicalDevices(gnInstanceHandle instance, uint32_t* count) {